/* ---- Bottom bar ---- */

#ics-consent-bar {
	all: initial;
	position: fixed !important;
	left: 20px !important;
	bottom: 20px !important;
	right: auto !important;
	z-index: 2147483000 !important;
	display: block !important;
	width: calc(100% - 40px) !important;
	max-width: 600px !important;
	box-sizing: border-box !important;
	background: #ffffff !important;
	color: #1e1e1e !important;
	padding: 20px !important;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
	border-radius: 12px !important;
	border: 1px solid #e2e2e2 !important;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18) !important;
}

#ics-consent-bar .ics-message {
	margin: 0 0 14px;
	color: #1e1e1e;
}

@media (max-width: 640px) {
	#ics-consent-bar {
		left: 12px !important;
		right: 12px !important;
		bottom: 12px !important;
		width: auto !important;
		max-width: none !important;
	}

	#ics-consent-bar .ics-actions,
	.ics-modal-actions {
		flex-direction: column;
	}

	#ics-consent-bar .ics-btn,
	.ics-modal-actions .ics-btn {
		width: 100%;
	}
}

/* ---- Shared buttons ---- */

.ics-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ics-btn {
	all: unset;
	box-sizing: border-box;
	border: 1px solid #ccc;
	background: #f5f5f5;
	color: #1e1e1e;
	padding: 9px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	text-align: center;
	font-family: inherit;
}

.ics-btn-primary {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.ics-btn:hover {
	filter: brightness(0.97);
}

.ics-btn-primary:hover {
	filter: brightness(1.1);
}

/* ---- Preferences modal ---- */

.ics-modal-overlay {
	position: fixed !important;
	inset: 0 !important;
	z-index: 2147483001 !important;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.ics-modal-panel {
	background: #fff;
	color: #1e1e1e;
	max-width: 610px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.ics-modal-title {
	margin: 0 0 8px;
	font-size: 20px;
}

.ics-modal-intro {
	margin: 0 0 16px;
	color: #555;
}

.ics-modal-actions {
	margin-top: 20px;
	border-top: 1px solid #e2e2e2;
	padding-top: 16px;
}

.ics-modal-actions .ics-btn {
	background: #f0f0f0;
	color: #1e1e1e;
	border-color: #ccc;
}

.ics-modal-actions .ics-btn-primary {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

/* ---- Category row ---- */

.ics-category-row {
	border-bottom: 1px solid #e2e2e2;
	padding: 14px 0;
}

.ics-category-row:first-of-type {
	border-top: 1px solid #e2e2e2;
}

.ics-category-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.ics-category-title-wrap {
	flex: 1;
}

.ics-category-title {
	display: block;
	font-size: 15px;
}

.ics-category-description {
	margin: 4px 0 0;
	font-size: 13px;
	color: #666;
}

/* ---- Toggle switch ---- */

.ics-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex-shrink: 0;
}

.ics-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.ics-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: #ccc;
	border-radius: 24px;
	transition: 0.2s;
}

.ics-slider::before {
	position: absolute;
	content: '';
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: #fff;
	border-radius: 50%;
	transition: 0.2s;
}

.ics-switch input:checked + .ics-slider {
	background-color: #2271b1;
}

.ics-switch input:checked + .ics-slider::before {
	transform: translateX(18px);
}

.ics-switch input:disabled + .ics-slider {
	background-color: #8fb8d8;
	cursor: not-allowed;
}

/* ---- Accordion ---- */

.ics-category-accordion {
	margin-top: 10px;
}

.ics-category-accordion summary {
	cursor: pointer;
	font-size: 13px;
	color: #2271b1;
	list-style: none;
}

.ics-category-accordion summary::-webkit-details-marker {
	display: none;
}

.ics-category-accordion summary::before {
	content: '▸ ';
}

.ics-category-accordion[open] summary::before {
	content: '▾ ';
}

.ics-cookie-list {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
}

.ics-cookie-item {
	padding: 8px 10px;
	background: #f7f7f7;
	border-radius: 4px;
	margin-bottom: 6px;
	font-size: 13px;
}

.ics-cookie-provider {
	color: #666;
}

.ics-cookie-description {
	margin: 4px 0 0;
	color: #555;
}

.ics-cookie-empty {
	font-size: 13px;
	color: #888;
	margin-top: 10px;
}

/* ---- Floating reopen icon ---- */

.ics-reopen-icon {
	all: unset;
	position: fixed !important;
	left: 16px !important;
	bottom: 16px !important;
	z-index: 2147483000 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #ffffff;
	color: #1e1e1e;
	border: 1px solid #e2e2e2;
	font-size: 20px;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ics-reopen-icon:hover {
	filter: brightness(0.96);
}
