/**
 * Cookie consent bar + preferences dialog.
 *
 * Scoped under .sam-cc / .sam-cc-modal and specific enough to survive Woodmart,
 * whose global button rules otherwise win over single-class plugin styles.
 * Accept and Reject are deliberately identical in size and weight — POPIA-grade
 * consent means declining is exactly as easy as accepting.
 */

.sam-cc {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100000;
	background: #ffffff;
	color: #24272c;
	border-top: 3px solid #355fb7;
	box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.16);
	padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
	font-size: 14px;
	line-height: 1.55;
}

.sam-cc[hidden] {
	display: none !important;
}

.sam-cc__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1220px;
	margin: 0 auto;
	flex-wrap: wrap;
}

.sam-cc__copy {
	flex: 1 1 420px;
	min-width: 0;
}

.sam-cc__title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
	color: #14161a;
}

.sam-cc__text {
	margin: 0;
	color: #4a4f57;
}

.sam-cc__text a,
.sam-cc-modal__foot a {
	color: #355fb7;
	text-decoration: underline;
}

.sam-cc__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.sam-cc .sam-cc__btn,
.sam-cc-modal .sam-cc__btn {
	display: inline-block;
	min-width: 132px;
	margin: 0;
	padding: 11px 20px;
	border: 2px solid transparent;
	border-radius: 4px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.sam-cc .sam-cc__btn:hover,
.sam-cc-modal .sam-cc__btn:hover {
	opacity: 0.88;
}

.sam-cc .sam-cc__btn:focus-visible,
.sam-cc-modal .sam-cc__btn:focus-visible {
	outline: 3px solid #f5a623;
	outline-offset: 2px;
}

.sam-cc .sam-cc__btn--accept,
.sam-cc-modal .sam-cc__btn--accept {
	background: #355fb7;
	color: #ffffff;
}

.sam-cc .sam-cc__btn--reject,
.sam-cc-modal .sam-cc__btn--reject {
	background: #2f3542;
	color: #ffffff;
}

.sam-cc .sam-cc__btn--save,
.sam-cc-modal .sam-cc__btn--save {
	background: #ffffff;
	color: #355fb7;
	border-color: #355fb7;
}

.sam-cc .sam-cc__btn--link,
.sam-cc-modal .sam-cc__btn--link {
	min-width: 0;
	padding: 11px 6px;
	background: none;
	color: #355fb7;
	text-decoration: underline;
	font-weight: 500;
}

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

.sam-cc-modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.sam-cc-modal[hidden] {
	display: none !important;
}

.sam-cc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 15, 20, 0.6);
}

.sam-cc-modal .sam-cc-modal__dialog {
	position: relative !important;
	width: 100%;
	max-width: 620px;
	max-height: 86vh;
	overflow-y: auto;
	background: #ffffff;
	color: #24272c;
	border-radius: 6px;
	padding: 28px 28px 22px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	font-size: 14px;
	line-height: 1.55;
}

/*
 * Woodmart styles every <button> globally — position:relative, a grey fill and
 * a border — which beats a single-class plugin rule, so the close control needs
 * both the extra specificity and !important to stay in its corner.
 */
.sam-cc-modal .sam-cc-modal__close {
	position: absolute !important;
	top: 8px;
	right: 10px;
	width: 34px;
	height: 34px;
	min-width: 0;
	padding: 0;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	font-size: 26px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
}

.sam-cc-modal .sam-cc-modal__close:hover {
	color: #14161a;
}

.sam-cc-modal__title {
	margin: 0 0 8px;
	padding-right: 44px;
	font-size: 20px;
	font-weight: 700;
	color: #14161a;
}

.sam-cc-modal__intro {
	margin: 0 0 18px;
	color: #4a4f57;
}

.sam-cc-cat {
	border-top: 1px solid #e6e8ec;
	padding: 14px 0 4px;
}

.sam-cc-cat__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 4px;
	cursor: pointer;
}

.sam-cc-cat__head input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: #355fb7;
	flex: 0 0 auto;
}

.sam-cc-cat__name {
	font-weight: 700;
	color: #14161a;
}

.sam-cc-cat__always {
	margin-left: auto;
	font-size: 12px;
	font-weight: 600;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.sam-cc-cat__desc {
	margin: 0 0 6px 28px;
	color: #4a4f57;
}

.sam-cc-modal__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	border-top: 1px solid #e6e8ec;
	margin-top: 14px;
	padding-top: 18px;
}

.sam-cc-modal__foot {
	margin: 14px 0 0;
	font-size: 13px;
	color: #6b7280;
}

.sam-cc-open {
	overflow: hidden;
}

/* -------------------------------------------------------------------- small */

@media (max-width: 767px) {
	.sam-cc {
		padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
		max-height: 70vh;
		overflow-y: auto;
	}

	.sam-cc__inner {
		gap: 12px;
	}

	.sam-cc__actions {
		width: 100%;
	}

	.sam-cc .sam-cc__btn--accept,
	.sam-cc .sam-cc__btn--reject {
		flex: 1 1 45%;
		min-width: 0;
	}

	.sam-cc .sam-cc__btn--link {
		flex: 1 1 100%;
	}

	.sam-cc-modal__dialog {
		padding: 24px 18px 18px;
	}
}
