/* Sharks Cookie Frontend
   Compact card design — original Marketing Sharks black & white style */

/* ── Shared banner base ──────────────────────────────────── */

.sharks-cookie-banner {
	position: fixed;
	z-index: 999999;
	background: var(--sc-banner-bg, #fff);
	color: var(--sc-banner-text, #111);
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
	font-size: 14px;
	line-height: 1.55;
}

/* ── Full-width bottom bar (opt-in via admin) ─────────────── */

.sharks-cookie-pos-bottom {
	bottom: 0;
	left: 0;
	right: 0;
	padding: 20px 28px;
	border-top: 1px solid var(--sc-border-color, rgba(0,0,0,.10));
	box-shadow: 0 -4px 24px rgba(0,0,0,.09);
}

.sharks-cookie-pos-bottom .sharks-cookie-banner-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	max-width: 1200px;
	margin: 0 auto;
}

.sharks-cookie-pos-bottom .sharks-cookie-banner-text {
	flex: 1 1 320px;
}

.sharks-cookie-pos-bottom .sharks-cookie-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex-shrink: 0;
	align-items: center;
}

/* In full-width bar, the secondary-row wrapper is inline */
.sharks-cookie-pos-bottom .sharks-cookie-banner-secondary-row {
	display: contents;
}

/* ── Compact card — bottom-left / bottom-right ────────────── */

.sharks-cookie-pos-bottom-left,
.sharks-cookie-pos-bottom-right {
	width: clamp(320px, 25vw, 420px);
	padding: 24px 26px 22px;
	border-radius: var(--sc-radius, 20px);
	border: 1px solid rgba(0, 0, 0, .08);
	box-shadow: 0 18px 45px rgba(0, 0, 0, .18), 0 4px 12px rgba(0, 0, 0, .07);
}

.sharks-cookie-pos-bottom-left {
	bottom: 24px;
	left: 24px;
}

.sharks-cookie-pos-bottom-right {
	bottom: 24px;
	right: 24px;
}

/* Stacked inner layout for card */
.sharks-cookie-pos-bottom-left .sharks-cookie-banner-inner,
.sharks-cookie-pos-bottom-right .sharks-cookie-banner-inner {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.sharks-cookie-pos-bottom-left .sharks-cookie-banner-text,
.sharks-cookie-pos-bottom-right .sharks-cookie-banner-text {
	margin-bottom: 18px;
}

/* Card button layout: secondary row on top, primary full-width below */
.sharks-cookie-pos-bottom-left .sharks-cookie-banner-actions,
.sharks-cookie-pos-bottom-right .sharks-cookie-banner-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sharks-cookie-pos-bottom-left .sharks-cookie-banner-actions .sharks-cookie-btn-secondary,
.sharks-cookie-pos-bottom-right .sharks-cookie-banner-actions .sharks-cookie-btn-secondary {
	/* Secondary buttons sit in a row together */
	flex: 1;
}

/* Group the two secondary buttons into a flex row */
.sharks-cookie-pos-bottom-left .sharks-cookie-banner-secondary-row,
.sharks-cookie-pos-bottom-right .sharks-cookie-banner-secondary-row {
	display: flex;
	gap: 8px;
}

.sharks-cookie-pos-bottom-left .sharks-cookie-banner-actions .sharks-cookie-btn-primary,
.sharks-cookie-pos-bottom-right .sharks-cookie-banner-actions .sharks-cookie-btn-primary {
	width: 100%;
}

/* ── Center modal-style banner ───────────────────────────── */

.sharks-cookie-pos-center {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 520px;
	width: calc(100% - 40px);
	padding: 24px 28px;
	border-radius: var(--sc-radius, 20px);
	border: 1px solid rgba(0, 0, 0, .08);
	box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
}

.sharks-cookie-pos-center .sharks-cookie-banner-inner {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.sharks-cookie-pos-center .sharks-cookie-banner-text {
	margin-bottom: 18px;
}

.sharks-cookie-pos-center .sharks-cookie-banner-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sharks-cookie-pos-center .sharks-cookie-banner-secondary-row {
	display: flex;
	gap: 8px;
}

.sharks-cookie-pos-center .sharks-cookie-banner-secondary-row .sharks-cookie-btn {
	flex: 1;
}

.sharks-cookie-pos-center .sharks-cookie-banner-actions .sharks-cookie-btn-primary {
	width: 100%;
}

/* ── Text inside banner ───────────────────────────────────── */

.sharks-cookie-banner-title {
	display: block;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 8px;
	line-height: 1.3;
}

.sharks-cookie-banner-desc {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: var(--sc-banner-text, #111);
	opacity: .75;
}

/* ── Buttons ─────────────────────────────────────────────── */

.sharks-cookie-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border-radius: calc(var(--sc-radius, 20px) * 0.6);
	transition: opacity .15s, box-shadow .15s;
	font-family: inherit;
	line-height: 1.2;
	min-height: 40px;
	white-space: nowrap;
	text-align: center;
}

.sharks-cookie-btn:hover {
	opacity: .85;
}

.sharks-cookie-btn:focus-visible {
	outline: 2px solid var(--sc-btn-primary-bg, #111);
	outline-offset: 2px;
}

.sharks-cookie-btn-primary {
	background: var(--sc-btn-primary-bg, #111);
	color: var(--sc-btn-primary-text, #fff);
	border: 1px solid var(--sc-btn-primary-bg, #111);
}

.sharks-cookie-btn-secondary {
	background: var(--sc-btn-secondary-bg, #fff);
	color: var(--sc-btn-secondary-text, #111);
	border: 1px solid var(--sc-btn-secondary-border, #111);
}

/* ── Overlay ─────────────────────────────────────────────── */

.sharks-cookie-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	background: rgba(0, 0, 0, .45);
}

/* ── Preferences modal ───────────────────────────────────── */

.sharks-cookie-modal {
	position: fixed;
	z-index: 1000001;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: var(--sc-modal-bg, #fff);
	color: var(--sc-banner-text, #111);
	max-width: 600px;
	width: calc(100% - 40px);
	max-height: 90vh;
	border-radius: var(--sc-radius, 20px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .20), 0 4px 16px rgba(0, 0, 0, .08);
	border: 1px solid rgba(0, 0, 0, .07);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
	font-size: 14px;
	line-height: 1.55;
	display: flex;
	flex-direction: column;
}

.sharks-cookie-modal-inner {
	display: flex;
	flex-direction: column;
	max-height: 90vh;
}

.sharks-cookie-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 14px;
	border-bottom: 1px solid var(--sc-border-color, rgba(0,0,0,.08));
}

.sharks-cookie-modal-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.sharks-cookie-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	padding: 4px 8px;
	line-height: 1;
	color: inherit;
	border-radius: 8px;
	opacity: .55;
	transition: opacity .15s;
}

.sharks-cookie-modal-close:hover {
	opacity: 1;
	background: rgba(0, 0, 0, .05);
}

.sharks-cookie-modal-close:focus-visible {
	outline: 2px solid var(--sc-btn-primary-bg, #111);
	outline-offset: 2px;
	opacity: 1;
}

.sharks-cookie-modal-body {
	padding: 18px 24px;
	overflow-y: auto;
	flex: 1 1 auto;
}

.sharks-cookie-modal-intro {
	margin: 0 0 18px;
	font-size: 13px;
	line-height: 1.6;
	opacity: .75;
}

/* ── Category accordion items ────────────────────────────── */

.sharks-cookie-category-item {
	border: 1px solid var(--sc-border-color, rgba(0,0,0,.10));
	border-radius: 12px;
	margin-bottom: 8px;
	overflow: hidden;
	transition: box-shadow .15s;
}

.sharks-cookie-category-item:last-child {
	margin-bottom: 0;
}

.sharks-cookie-category-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 13px 16px;
	cursor: pointer;
	user-select: none;
	background: none;
	border: none;
	width: 100%;
	font: inherit;
	color: inherit;
	text-align: left;
}

.sharks-cookie-category-header:hover {
	background: rgba(0, 0, 0, .025);
}

.sharks-cookie-category-header:focus-visible {
	outline: 2px solid var(--sc-btn-primary-bg, #111);
	outline-offset: -2px;
}

.sharks-cookie-category-name {
	font-weight: 600;
	font-size: 14px;
}

.sharks-cookie-category-badge {
	font-size: 11px;
	font-weight: 500;
	color: var(--sc-toggle-active, #111);
	opacity: .55;
	margin-left: 8px;
}

.sharks-cookie-category-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sharks-cookie-category-desc {
	padding: 0 16px 14px;
	font-size: 13px;
	line-height: 1.55;
	opacity: .72;
	display: none;
}

.sharks-cookie-category-item.open .sharks-cookie-category-desc {
	display: block;
}

/* ── Toggle switch ───────────────────────────────────────── */

.sharks-cookie-toggle {
	position: relative;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}

.sharks-cookie-toggle input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.sharks-cookie-toggle-slider {
	position: absolute;
	inset: 0;
	background: var(--sc-toggle-inactive, #ccc);
	border-radius: 24px;
	cursor: pointer;
	transition: background .2s;
}

.sharks-cookie-toggle-slider::before {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	top: 3px;
	left: 3px;
	transition: transform .2s;
	box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.sharks-cookie-toggle input:checked + .sharks-cookie-toggle-slider {
	background: var(--sc-toggle-active, #111);
}

.sharks-cookie-toggle input:checked + .sharks-cookie-toggle-slider::before {
	transform: translateX(20px);
}

.sharks-cookie-toggle input:focus-visible + .sharks-cookie-toggle-slider {
	outline: 2px solid var(--sc-btn-primary-bg, #111);
	outline-offset: 2px;
}

.sharks-cookie-toggle input:disabled + .sharks-cookie-toggle-slider {
	opacity: .55;
	cursor: default;
}

/* ── Modal footer ────────────────────────────────────────── */

.sharks-cookie-modal-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 14px 24px 20px;
	border-top: 1px solid var(--sc-border-color, rgba(0,0,0,.08));
	justify-content: flex-end;
}

/* ── Floating preferences wrapper ────────────────────────── */

.sharks-cookie-floating-wrap {
	position: fixed;
	z-index: 999998;
	bottom: 28px;
	left: 24px;
}

/* ── Floating preferences button (icon-only circle) ──────── */

.sharks-cookie-floating-btn {
	width: 66px;
	height: 66px;
	padding: 14px;
	border-radius: 999px;
	background: #fff;
	color: #111;
	border: 0.75px solid #111;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .09);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-family: inherit;
	transition: transform .15s, box-shadow .15s;
}

.sharks-cookie-floating-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .22), 0 3px 8px rgba(0, 0, 0, .10);
}

.sharks-cookie-floating-btn:focus-visible {
	outline: 2px solid #111;
	outline-offset: 3px;
}

/* Shark icon inside the button */
.sharks-cookie-floating-icon {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	pointer-events: none;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 600px) {
	/* Compact cards collapse to near-full width on mobile */
	.sharks-cookie-pos-bottom-left,
	.sharks-cookie-pos-bottom-right {
		width: calc(100% - 32px);
		max-width: none;
		left: 16px;
		right: 16px;
		bottom: 16px;
		border-radius: 18px;
	}

	/* Full-width bar gets simpler on mobile */
	.sharks-cookie-pos-bottom {
		padding: 16px 18px;
	}

	.sharks-cookie-pos-bottom .sharks-cookie-banner-inner {
		flex-direction: column;
		align-items: stretch;
	}

	.sharks-cookie-pos-bottom .sharks-cookie-banner-actions {
		flex-direction: column;
	}

	.sharks-cookie-pos-bottom .sharks-cookie-banner-actions .sharks-cookie-btn {
		width: 100%;
	}

	/* Modal */
	.sharks-cookie-modal {
		width: calc(100% - 24px);
		max-height: 95vh;
		border-radius: 18px;
	}

	.sharks-cookie-modal-footer {
		flex-direction: column;
	}

	.sharks-cookie-modal-footer .sharks-cookie-btn {
		width: 100%;
	}

	/* Floating icon button — smaller on mobile */
	.sharks-cookie-floating-wrap {
		bottom: 18px;
		left: 16px;
	}

	.sharks-cookie-floating-btn {
		width: 56px;
		height: 56px;
		padding: 11px;
	}
}
