/* COOKIE CONSENT DEFAULT LOOK */
/* Self-contained, plain CSS — no Tailwind, no theme dependency. Every color
   and spacing value is a CSS custom property with a fallback, so a child
   theme overrides the look by redefining these variables (or the rules
   directly) — same convention as the .bscovery-btn tokens in the base theme. */

/* .bscovery-cmp-modal is the fixed, scrollable overlay — it does NOT also
   center its content via flex align-items. .bscovery-cmp-modal__dialog is a
   separate flex layer that centers the panel when it's shorter than the
   viewport; once the panel grows taller, the dialog simply grows past the
   viewport and the outer .bscovery-cmp-modal scrolls it as ordinary block
   overflow. Combining "scrolls" and "centers" on the same element is a known
   flexbox pitfall — some browsers won't let you scroll up to content that
   overflows above a centered item — so those two jobs are kept on separate
   elements on purpose. */

.bscovery-cmp-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--cmp-overlay-bg, rgba(0, 0, 0, 0.5));
}

.bscovery-cmp-modal.is-open {
	display: block;
}

.bscovery-cmp-modal__dialog {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	padding: 1rem;
}

.bscovery-cmp-modal__panel {
	position: relative;
	width: 100%;
	max-width: 700px;
	padding: 2rem;
	border-radius: var(--cmp-panel-radius, 8px);
	background: var(--cmp-panel-bg, #ffffff);
	color: var(--cmp-panel-color, #1a1a1a);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.bscovery-cmp-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2rem;
	height: 2rem;
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
}

.bscovery-cmp-modal__title {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--cmp-title-color, inherit);
}

.bscovery-cmp-modal__intro {
	margin: 0 0 1.5rem;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.bscovery-cmp-modal__intro a {
	color: inherit;
	text-decoration: underline;
}

.bscovery-cmp-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: flex-end;
}

/* Below 600px, "Accept all" leads and "Reject all" trails, regardless of
   which view is showing (intro: Reject/Customize/Accept · categories:
   Reject/Accept/Save) — order is set explicitly rather than via
   flex-direction: row-reverse, since the middle button differs per view. */
@media (max-width: 599px) {
	.bscovery-cmp-modal__actions {
		justify-content: center;
	}
	.bscovery-cmp-modal__actions [data-cmp-accept-all] {
		order: 1;
	}
	.bscovery-cmp-modal__actions [data-cmp-customize],
	.bscovery-cmp-modal__actions [data-cmp-save] {
		order: 2;
	}
	.bscovery-cmp-modal__actions [data-cmp-reject-all] {
		order: 3;
	}
}

@media (max-width:520px){
    .bscovery-cmp-modal__actions{
        display:flex;
        width:100%;
        text-align:center;
    }
    .bscovery-cmp-modal__actions button {
        /* margin:5px 0 */
         width:100%;
        text-align:center;
    }
}

/* BUTTONS */

.bscovery-cmp-btn {
	padding: 0.625rem 1.25rem;
	border: 1px solid transparent;
	border-radius: var(--cmp-btn-radius, 0);
	font-size: 0.9375rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.bscovery-cmp-btn--primary {
	background: var(--cmp-btn-primary-bg, #1a1a1a);
	color: var(--cmp-btn-primary-color, #ffffff);
}
.bscovery-cmp-btn--primary:hover {
	background: var(--cmp-btn-primary-bg-hover, #333333);
}

.bscovery-cmp-btn--secondary {
	background: var(--cmp-btn-secondary-bg, #f0f0f0);
	color: var(--cmp-btn-secondary-color, #1a1a1a);
}
.bscovery-cmp-btn--secondary:hover {
	background: var(--cmp-btn-secondary-bg-hover, #e0e0e0);
}

.bscovery-cmp-btn--tertiary {
	background: transparent;
	border-color: currentColor;
	color: var(--cmp-btn-tertiary-color, #1a1a1a);
}
.bscovery-cmp-btn--tertiary:hover {
	background: rgba(0, 0, 0, 0.05);
}

/* CATEGORIES LIST */

.bscovery-cmp-categories {
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
}

.bscovery-cmp-category {
	padding: 1rem 0;
	border-top: 1px solid var(--cmp-divider-color, #e5e5e5);
}
.bscovery-cmp-category:first-child {
	border-top: 0;
}

.bscovery-cmp-category__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.bscovery-cmp-category__label {
	font-weight: 600;
}

.bscovery-cmp-category__description {
	margin: 0.375rem 0 0;
	font-size: 0.875rem;
	color: var(--cmp-description-color, #666666);
}

/* TOGGLE SWITCH */

.bscovery-cmp-switch {
	position: relative;
	display: inline-block;
	width: 2.75rem;
	height: 1.5rem;
	flex-shrink: 0;
}

.bscovery-cmp-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.bscovery-cmp-switch__track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: var(--cmp-switch-off-bg, #cccccc);
	transition: background-color 0.15s ease;
}
.bscovery-cmp-switch__track::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: calc(1.5rem - 4px);
	height: calc(1.5rem - 4px);
	border-radius: 50%;
	background: #ffffff;
	transition: transform 0.15s ease;
}

.bscovery-cmp-switch input:checked + .bscovery-cmp-switch__track {
	background: var(--cmp-switch-on-bg, #1a1a1a);
}
.bscovery-cmp-switch input:checked + .bscovery-cmp-switch__track::before {
	transform: translateX(1.25rem);
}

.bscovery-cmp-switch input:disabled + .bscovery-cmp-switch__track {
	opacity: 0.6;
	cursor: not-allowed;
}
.bscovery-cmp-switch input:disabled {
	cursor: not-allowed;
}