.cookice-root {
	--cookice-bg: #ffffff;
	--cookice-text: #1c2333;
	--cookice-accent: #3454d1;
	--cookice-accent-text: #ffffff;
	--cookice-btn2-bg: #eef1f8;
	--cookice-btn2-text: #1c2333;
	--cookice-border: #e3e7f1;
	--cookice-overlay: rgba(15, 23, 42, .55);
	--cookice-radius: 16px;
	--cookice-font: inherit;
	--cookice-z: 999999;
	position: fixed;
	inset: 0;
	pointer-events: none;
	font-family: var(--cookice-font);
	z-index: var(--cookice-z);
}

.cookice-root * {
	box-sizing: border-box;
}

.cookice-root[hidden] {
	display: none !important;
}

.cookice-panel {
	pointer-events: auto;
	position: absolute;
	background: var(--cookice-bg);
	color: var(--cookice-text);
	border: 1px solid var(--cookice-border);
	border-radius: var(--cookice-radius);
	box-shadow: 0 20px 45px rgba(20, 25, 45, .18);
	padding: 22px 24px;
	max-width: 480px;
	width: calc(100% - 32px);
	line-height: 1.6;
	font-size: 14.5px;
	animation: cookice-in .35s ease;
}

@keyframes cookice-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Layout: bottom / top bars */
.cookice-root[data-position="bar-bottom"] .cookice-panel,
.cookice-root[data-position="bar-top"] .cookice-panel {
	max-width: none;
	width: 100%;
	border-radius: 0;
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	justify-content: space-between;
	left: 0;
	right: 0;
}
.cookice-root[data-position="bar-bottom"] .cookice-panel { bottom: 0; }
.cookice-root[data-position="bar-top"] .cookice-panel { top: 0; }

/* Layout: bottom corner boxes */
.cookice-root[data-position="box-left"] .cookice-panel {
	bottom: 20px;
	left: 20px;
}
.cookice-root[data-position="box-right"] .cookice-panel {
	bottom: 20px;
	right: 20px;
}

/* Layout: centered modal */
.cookice-root[data-position="modal-center"] .cookice-overlay {
	pointer-events: auto;
	position: absolute;
	inset: 0;
	background: var(--cookice-overlay);
}
.cookice-root[data-position="modal-center"] .cookice-panel {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 560px;
	max-height: 86vh;
	overflow: auto;
}

.cookice-body { flex: 1 1 320px; }

.cookice-logo {
	max-height: 36px;
	margin-bottom: 10px;
	display: block;
}

.cookice-title {
	font-weight: 700;
	font-size: 17px;
	margin: 0 0 6px;
}

.cookice-message { margin: 0; opacity: .92; }
.cookice-message a { color: var(--cookice-accent); text-decoration: underline; }

.cookice-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	flex: 0 0 auto;
	margin-top: 14px;
}
.cookice-root[data-position="bar-bottom"] .cookice-actions,
.cookice-root[data-position="bar-top"] .cookice-actions {
	margin-top: 0;
}

.cookice-btn {
	appearance: none;
	border: none;
	cursor: pointer;
	border-radius: calc(var(--cookice-radius) * .55);
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	white-space: nowrap;
	transition: filter .15s ease, transform .1s ease;
}
.cookice-btn:active { transform: scale(.97); }
.cookice-btn:hover { filter: brightness(1.06); }

.cookice-btn--primary {
	background: var(--cookice-accent);
	color: var(--cookice-accent-text);
}
.cookice-btn--secondary {
	background: var(--cookice-btn2-bg);
	color: var(--cookice-btn2-text);
}
.cookice-btn--link {
	background: transparent;
	color: var(--cookice-text);
	text-decoration: underline;
	padding: 10px 6px;
}

/* Preferences view */
.cookice-prefs { display: none; flex-direction: column; gap: 14px; width: 100%; }
.cookice-root.cookice-mode--prefs .cookice-prefs { display: flex; }
.cookice-root.cookice-mode--prefs .cookice-simple { display: none; }

.cookice-prefs__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.cookice-category {
	border: 1px solid var(--cookice-border);
	border-radius: calc(var(--cookice-radius) * .5);
	padding: 12px 14px;
}
.cookice-category__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	cursor: pointer;
}
.cookice-category__name { font-weight: 700; font-size: 14px; }
.cookice-category__desc { margin: 6px 0 0; font-size: 13px; opacity: .85; }
.cookice-category__note { margin: 6px 0 0; font-size: 12px; opacity: .65; font-style: italic; }

.cookice-switch {
	position: relative;
	width: 42px;
	height: 24px;
	flex: 0 0 auto;
}
.cookice-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.cookice-switch__track {
	position: absolute;
	inset: 0;
	background: var(--cookice-btn2-bg);
	border-radius: 999px;
	transition: background .15s ease;
}
.cookice-switch__track::before {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	top: 3px;
	right: 3px;
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
	transition: transform .15s ease;
}
.cookice-switch input:checked + .cookice-switch__track { background: var(--cookice-accent); }
.cookice-switch input:checked + .cookice-switch__track::before { transform: translateX(-18px); }
.cookice-switch input:disabled + .cookice-switch__track { opacity: .55; cursor: not-allowed; }

.cookice-cookie-toggle {
	background: none;
	border: none;
	color: var(--cookice-accent);
	font-size: 12.5px;
	cursor: pointer;
	padding: 6px 0 0;
	text-decoration: underline;
}
.cookice-cookie-list {
	display: none;
	margin-top: 8px;
	font-size: 12.5px;
	border-top: 1px dashed var(--cookice-border);
	padding-top: 8px;
}
.cookice-cookie-list.is-open { display: block; }
.cookice-cookie-list table { width: 100%; border-collapse: collapse; }
.cookice-cookie-list td, .cookice-cookie-list th { text-align: right; padding: 3px 6px 3px 0; opacity: .85; }

/* Reopen floating button */
.cookice-reopen {
	pointer-events: auto;
	position: fixed;
	bottom: 18px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--cookice-accent);
	color: var(--cookice-accent-text);
	border: none;
	font-size: 20px;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(20,25,45,.25);
	z-index: var(--cookice-z);
	display: flex;
	align-items: center;
	justify-content: center;
}
.cookice-reopen[data-side="bottom-left"] { left: 18px; }
.cookice-reopen[data-side="bottom-right"] { right: 18px; }
.cookice-reopen[hidden] { display: none; }

@media (max-width: 640px) {
	.cookice-root[data-position="bar-bottom"] .cookice-panel,
	.cookice-root[data-position="bar-top"] .cookice-panel {
		flex-direction: column;
		align-items: stretch;
	}
	.cookice-actions { justify-content: stretch; }
	.cookice-btn { flex: 1 1 auto; }
}

/* Shortcode: cookie declaration table */
.cookice-declaration__group { margin-bottom: 22px; }
.cookice-declaration__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 18px;
	margin-bottom: 4px;
}
.cookice-declaration__badge {
	font-size: 11px;
	background: #eef1f8;
	color: #3454d1;
	border-radius: 999px;
	padding: 2px 10px;
	font-weight: 600;
}
.cookice-declaration__desc { opacity: .85; margin: 0 0 10px; }
.cookice-declaration__table-wrap { overflow-x: auto; }
.cookice-declaration__table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cookice-declaration__table th,
.cookice-declaration__table td {
	border: 1px solid #e3e7f1;
	padding: 8px 10px;
	text-align: right;
}
.cookice-declaration__table th { background: #f7f9fc; }

/* Shortcode: request form */
.cookice-request-form-wrap { max-width: 560px; }
.cookice-request-form .cookice-form-row { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.cookice-request-form label { font-weight: 600; font-size: 14px; }
.cookice-request-form input,
.cookice-request-form select,
.cookice-request-form textarea {
	border: 1px solid #d7dce6;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
	font-family: inherit;
	width: 100%;
}
.cookice-form-row--honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cookice-form-checkbox { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-bottom: 16px; }
.cookice-request-form__status { font-size: 14px; font-weight: 600; }
.cookice-request-form__status.is-error { color: #d1373f; }
.cookice-request-form__status.is-success { color: #1a8f4c; }
