/*!
 * Cookie Consent Banner for OpenCart 2.3 / 3.0 — storefront styles.
 * Every colour/size comes from CSS custom properties set per store in the admin.
 * Selectors are prefixed with .occ so theme styles for h2/button/ul don't leak in.
 */

/* ------------------------------------------------------------------ base */
.occ,
.occ *,
.occ *::before,
.occ *::after { box-sizing: border-box; }

.occ {
	position: relative;
	z-index: var(--occ-z, 9999);
	font-size: var(--occ-font-size, 14px);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
}
.occ--font-inherit { font-family: inherit; }
.occ--font-system { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.occ--font-serif { font-family: Georgia, Cambria, "Times New Roman", serif; }

.occ [hidden] { display: none !important; }

.occ h2, .occ h3, .occ p, .occ ul, .occ li {
	margin: 0; padding: 0; border: 0;
	font-family: inherit; letter-spacing: normal; text-transform: none; text-shadow: none;
	background: none;
}
.occ button {
	font-family: inherit; letter-spacing: normal; text-transform: none; text-shadow: none;
	margin: 0; -webkit-appearance: none; appearance: none;
}
.occ svg { display: block; flex: 0 0 auto; }

html.occ-locked, html.occ-locked body { overflow: hidden; }

/* ------------------------------------------------------------ overlays */
.occ .occ-overlay {
	position: fixed; top: 0; right: 0; bottom: 0; left: 0;
	z-index: var(--occ-z, 9999);
	background: var(--occ-overlay);
	opacity: 0;
	transition: opacity .25s ease-out;
}
.occ .occ-overlay.occ-is-open { opacity: 1; }

/* -------------------------------------------------------------- banner */
.occ .occ-banner {
	position: fixed;
	z-index: calc(var(--occ-z, 9999) + 1);
	background: var(--occ-bg);
	color: var(--occ-text);
	border: 1px solid var(--occ-border);
	opacity: 0;
	/* position transform + animation transform, composed through variables */
	transform: var(--occ-pos-t, translate(0, 0)) var(--occ-anim-t, translate(0, 0));
	transition: opacity .25s ease-out, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.occ .occ-banner:focus { outline: none; }

.occ .occ-banner__inner { display: flex; gap: 12px 16px; }
.occ .occ-body { min-width: 0; flex: 1 1 auto; }

.occ .occ-title {
	margin: 0 0 4px;
	color: var(--occ-title);
	font-size: 1.15em;
	font-weight: 700;
	line-height: 1.3;
}
.occ .occ-msg { color: var(--occ-text); font-size: 1em; line-height: 1.55; }
.occ .occ-msg a,
.occ .occ-link {
	color: var(--occ-link);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 500;
}
.occ .occ-msg a:hover,
.occ .occ-link:hover { text-decoration-thickness: 2px; }
.occ .occ-links { margin-top: 6px; font-size: .92em; }
.occ .occ-sep { margin: 0 8px; color: var(--occ-text); opacity: .6; }

.occ .occ-icon {
	display: inline-flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
	width: 44px; height: 44px;
	border-radius: 12px;
	background: var(--occ-accent-soft);
	color: var(--occ-link);
}

/* ------------------------------------------------------------- buttons */
.occ .occ-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.occ .occ-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: var(--occ-btn-radius);
	font-size: .95em;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	touch-action: manipulation;
	box-shadow: none;
	transition: opacity .15s ease, transform .1s ease, background-color .15s ease;
}
.occ .occ-btn:hover { opacity: .88; }
.occ .occ-btn:active { transform: scale(.98); }

.occ .occ-btn--primary { background: var(--occ-primary-bg); color: var(--occ-primary-text); }
.occ .occ-btn--secondary { background: var(--occ-secondary-bg); color: var(--occ-secondary-text); border-color: var(--occ-border); }
.occ .occ-btn--ghost {
	background: transparent;
	color: var(--occ-link);
	padding-left: 10px; padding-right: 10px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.occ .occ-btn:focus-visible,
.occ .occ-close:focus-visible,
.occ .occ-reopen:focus-visible,
.occ a:focus-visible,
.occ .occ-switch input:focus-visible + .occ-switch__track {
	outline: 2px solid var(--occ-link);
	outline-offset: 2px;
}

/* ----------------------------------------------------------------- bar */
.occ--bar .occ-banner { left: 0; right: 0; border-width: 0; }
.occ--bar.occ--pos-bottom .occ-banner { bottom: 0; border-top-width: 1px; padding-bottom: env(safe-area-inset-bottom, 0); }
.occ--bar.occ--pos-top .occ-banner { top: 0; border-bottom-width: 1px; }
.occ--bar .occ-banner__inner {
	max-width: var(--occ-max-width);
	margin: 0 auto;
	padding: 16px 24px;
	align-items: center;
}
.occ--bar .occ-actions { flex: 0 0 auto; }

/* ----------------------------------------------------------------- box */
.occ--box .occ-banner {
	width: calc(100% - 32px);
	max-width: var(--occ-max-width);
	border-radius: var(--occ-radius);
}
.occ--box .occ-banner__inner { padding: 20px; flex-direction: column; }
.occ--box .occ-banner__inner > .occ-icon { margin-bottom: 2px; }
.occ--box:not(.occ--wide) .occ-actions .occ-btn { flex: 1 1 auto; }
.occ--box.occ--wide .occ-banner__inner { flex-direction: row; align-items: center; padding: 16px 16px 16px 20px; }
.occ--box.occ--wide .occ-actions { flex: 0 0 auto; }

.occ--pos-top-left .occ-banner     { top: 16px; left: 16px; }
.occ--pos-top-right .occ-banner    { top: 16px; right: 16px; }
.occ--pos-top-center .occ-banner   { top: 16px; left: 0; right: 0; margin: 0 auto; }
.occ--pos-bottom-left .occ-banner  { bottom: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px)); left: 16px; }
.occ--pos-bottom-right .occ-banner { bottom: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px)); right: 16px; }
.occ--pos-bottom-center .occ-banner { bottom: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px)); left: 0; right: 0; margin: 0 auto; }

/* --------------------------------------------------------------- modal */
.occ--modal .occ-banner {
	--occ-pos-t: translate(-50%, -50%);
	top: 50%; left: 50%;
	width: calc(100% - 32px);
	max-width: var(--occ-max-width);
	max-height: calc(100% - 32px);
	overflow: auto;
	border-radius: var(--occ-radius);
	text-align: center;
}
.occ--modal .occ-banner__inner { flex-direction: column; align-items: center; padding: 32px 28px 24px; }
.occ--modal .occ-icon { width: 52px; height: 52px; border-radius: 50%; }
.occ--modal .occ-title { font-size: 1.35em; margin-bottom: 8px; }
.occ--modal .occ-actions { width: 100%; justify-content: center; margin-top: 8px; }
.occ--modal .occ-actions .occ-btn--primary,
.occ--modal .occ-actions .occ-btn--secondary { flex: 1 1 140px; }
.occ--modal .occ-actions .occ-btn--ghost { order: 3; flex-basis: 100%; }

/* --------------------------------------------------------------- effects */
.occ--shadow-soft .occ-banner,
.occ--shadow-soft .occ-prefs__panel { box-shadow: 0 12px 32px -8px rgba(15, 23, 42, .20), 0 2px 6px rgba(15, 23, 42, .06); }
.occ--shadow-strong .occ-banner,
.occ--shadow-strong .occ-prefs__panel { box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .45), 0 4px 12px rgba(0, 0, 0, .12); }
.occ--bar.occ--pos-bottom.occ--shadow-soft .occ-banner { box-shadow: 0 -6px 24px -6px rgba(15, 23, 42, .18); }
.occ--bar.occ--pos-bottom.occ--shadow-strong .occ-banner { box-shadow: 0 -10px 40px -8px rgba(0, 0, 0, .40); }

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.occ--blur .occ-banner {
		background: var(--occ-bg-glass);
		-webkit-backdrop-filter: blur(16px) saturate(1.4);
		backdrop-filter: blur(16px) saturate(1.4);
	}
}

/* ----------------------------------------------------------- animation */
.occ--anim-slide.occ--pos-bottom .occ-banner,
.occ--anim-slide[class*="occ--pos-bottom-"] .occ-banner { --occ-anim-t: translateY(24px); }
.occ--anim-slide.occ--pos-top .occ-banner,
.occ--anim-slide[class*="occ--pos-top-"] .occ-banner { --occ-anim-t: translateY(-24px); }
.occ--anim-slide.occ--pos-center .occ-banner,
.occ--anim-fade.occ--pos-center .occ-banner { --occ-anim-t: scale(.96); }

.occ .occ-banner.occ-is-open { opacity: 1; --occ-anim-t: translate(0, 0); }

.occ--anim-none .occ-banner,
.occ--anim-none .occ-overlay,
.occ--anim-none .occ-prefs,
.occ--anim-none .occ-prefs__panel,
.occ--anim-none .occ-reopen,
.occ--instant .occ-banner,
.occ--instant .occ-overlay,
.occ--instant .occ-prefs,
.occ--instant .occ-prefs__panel,
.occ--instant .occ-reopen { transition: none !important; }

/* --------------------------------------------------------- preferences */
.occ .occ-prefs {
	position: fixed; top: 0; right: 0; bottom: 0; left: 0;
	z-index: calc(var(--occ-z, 9999) + 2);
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
	background: var(--occ-scrim);
	opacity: 0;
	transition: opacity .2s ease-out;
}
.occ .occ-prefs.occ-is-open { opacity: 1; }

.occ .occ-prefs__panel {
	display: flex; flex-direction: column;
	width: 100%;
	max-width: 560px;
	max-height: calc(100% - 16px);
	background: var(--occ-bg);
	color: var(--occ-text);
	border: 1px solid var(--occ-border);
	border-radius: var(--occ-radius);
	overflow: hidden;
	text-align: left;
	transform: translateY(12px) scale(.98);
	transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.occ .occ-prefs.occ-is-open .occ-prefs__panel { transform: none; }

.occ .occ-prefs__head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 20px 16px 8px 24px;
}
.occ .occ-prefs__head .occ-title { margin: 0; }
.occ .occ-prefs__body { padding: 0 24px 8px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.occ .occ-prefs__foot {
	display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
	padding: 16px 24px 20px;
	border-top: 1px solid var(--occ-border);
}
.occ .occ-prefs__foot .occ-btn { flex: 1 1 auto; }

.occ .occ-close {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px;
	border: 0; border-radius: 50%;
	background: transparent;
	color: var(--occ-title);
	cursor: pointer;
	transition: background-color .15s ease;
}
.occ .occ-close:hover { background: var(--occ-accent-soft); }

.occ .occ-cats { list-style: none; margin: 16px 0 0; padding: 0; }
.occ .occ-cat {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 14px 0;
	border-top: 1px solid var(--occ-border);
}
.occ .occ-cat__title { color: var(--occ-title); font-size: 1em; font-weight: 600; line-height: 1.4; }
.occ .occ-cat__desc { color: var(--occ-text); font-size: .92em; margin-top: 2px; }
.occ .occ-cat__always { color: var(--occ-link); font-size: .85em; font-weight: 600; white-space: nowrap; }

/* switch */
.occ .occ-switch {
	position: relative;
	display: inline-flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
	min-width: 48px; min-height: 44px;
	cursor: pointer;
}
.occ .occ-switch input {
	position: absolute; top: 0; left: 0;
	width: 100%; height: 100%;
	margin: 0; opacity: 0;
	cursor: pointer;
}
.occ .occ-switch__track {
	position: relative;
	width: 44px; height: 26px;
	border-radius: 999px;
	background: var(--occ-border);
	box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .45);
	transition: background-color .2s ease;
}
.occ .occ-switch__thumb {
	position: absolute; top: 3px; left: 3px;
	width: 20px; height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .2s cubic-bezier(.2, .8, .2, 1), background-color .2s ease;
}
.occ .occ-switch input:checked + .occ-switch__track { background: var(--occ-primary-bg); box-shadow: none; }
.occ .occ-switch input:checked + .occ-switch__track .occ-switch__thumb { transform: translateX(18px); background: var(--occ-primary-text); }

/* ------------------------------------------------------ floating button */
.occ .occ-reopen {
	position: fixed;
	bottom: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px));
	left: 16px;
	z-index: var(--occ-z, 9999);
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px;
	padding: 0;
	border: 1px solid var(--occ-border);
	border-radius: 50%;
	background: var(--occ-bg);
	color: var(--occ-link);
	box-shadow: 0 6px 20px -6px rgba(0, 0, 0, .35);
	cursor: pointer;
	opacity: 0;
	transform: scale(.8);
	transition: opacity .2s ease-out, transform .2s cubic-bezier(.2, .8, .2, 1);
}
.occ .occ-reopen.occ-is-open { opacity: 1; transform: none; }
.occ .occ-reopen:hover { transform: scale(1.06); }
.occ .occ-reopen--right { left: auto; right: 16px; }

/* ----------------------------------------------------------- responsive */
@media (max-width: 767px) {
	.occ--bar .occ-banner__inner { flex-direction: column; align-items: stretch; padding: 16px; }
	.occ--bar .occ-banner__inner > .occ-icon { display: none; }
	.occ--bar .occ-actions .occ-btn,
	.occ--box.occ--wide .occ-actions .occ-btn { flex: 1 1 auto; }
	.occ--box.occ--wide .occ-banner__inner { flex-direction: column; align-items: stretch; padding: 20px; }
}

@media (max-width: 480px) {
	.occ--box .occ-banner {
		left: 12px !important; right: 12px !important;
		width: auto; max-width: none; margin: 0;
	}
	.occ--box[class*="occ--pos-bottom"] .occ-banner { bottom: 12px; bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
	.occ--box[class*="occ--pos-top"] .occ-banner { top: 12px; }
	.occ--modal .occ-banner__inner { padding: 24px 20px 20px; }

	/* Preferences become a bottom sheet — easier to reach with a thumb. */
	.occ .occ-prefs { align-items: flex-end; padding: 0; }
	.occ .occ-prefs__panel {
		max-width: none; max-height: 88%;
		border-bottom-left-radius: 0; border-bottom-right-radius: 0;
		border-bottom-width: 0;
		transform: translateY(40px);
	}
	.occ .occ-prefs__head { padding-left: 20px; }
	.occ .occ-prefs__body { padding: 0 20px 8px; }
	.occ .occ-prefs__foot { padding: 12px 20px; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
	.occ .occ-prefs__foot .occ-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.occ .occ-banner { --occ-anim-t: translate(0, 0) !important; }
	.occ .occ-banner,
	.occ .occ-overlay,
	.occ .occ-prefs,
	.occ .occ-prefs__panel,
	.occ .occ-reopen,
	.occ .occ-btn,
	.occ .occ-switch__thumb { transition-duration: .01ms !important; }
	.occ .occ-prefs__panel,
	.occ .occ-reopen { transform: none !important; }
}

@media print {
	.occ { display: none !important; }
}
