/* Momart Cookie Consent
 * Bottom-bar banner + preferences modal. Neutral, gallery-friendly styling;
 * tweak colours to match the momart.ro theme.
 */

:root {
	--momart-cc-bg: #ffffff;
	--momart-cc-fg: #1c1c1c;
	--momart-cc-muted: #555;
	--momart-cc-accent: #8a5a2b;       /* warm brown, matches the legal pages */
	--momart-cc-accent-fg: #ffffff;
	--momart-cc-border: #e2e2e2;
	--momart-cc-radius: 8px;
	--momart-cc-shadow: 0 -2px 24px rgba(0, 0, 0, .12);
	--momart-cc-z: 999999;
}

.momart-cc-no-scroll { overflow: hidden; }

/* ----- Bottom-bar banner --------------------------------------------- */
.momart-cc-banner[hidden] { display: none; }
.momart-cc-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: var(--momart-cc-z);
	background: var(--momart-cc-bg);
	color: var(--momart-cc-fg);
	border-top: 1px solid var(--momart-cc-border);
	box-shadow: var(--momart-cc-shadow);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
}
.momart-cc-banner__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 1rem 1.25rem;
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
}
.momart-cc-banner__text { margin: 0; flex: 1 1 360px; }
.momart-cc-banner__text a { color: var(--momart-cc-accent); text-decoration: underline; }
.momart-cc-banner__actions {
	display: flex;
	gap: .6rem;
	flex-wrap: wrap;
	flex: 0 0 auto;
}

/* ----- Buttons -------------------------------------------------------- */
.momart-cc-btn {
	font: inherit;
	cursor: pointer;
	border-radius: var(--momart-cc-radius);
	padding: .6rem 1.1rem;
	border: 1px solid var(--momart-cc-accent);
	background: transparent;
	color: var(--momart-cc-accent);
	transition: background .15s ease, color .15s ease, opacity .15s ease;
	white-space: nowrap;
}
.momart-cc-btn:hover { opacity: .85; }
.momart-cc-btn--primary {
	background: var(--momart-cc-accent);
	color: var(--momart-cc-accent-fg);
}
.momart-cc-btn--ghost { background: transparent; }

/* ----- Modal ---------------------------------------------------------- */
.momart-cc-modal[hidden] { display: none; }
.momart-cc-modal {
	position: fixed;
	inset: 0;
	z-index: calc(var(--momart-cc-z) + 1);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.momart-cc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
}
.momart-cc-modal__dialog {
	position: relative;
	background: var(--momart-cc-bg);
	color: var(--momart-cc-fg);
	border-radius: 12px;
	max-width: 640px;
	width: 100%;
	max-height: 88vh;
	overflow-y: auto;
	padding: 2rem 1.75rem 1.5rem;
	box-shadow: 0 12px 48px rgba(0, 0, 0, .25);
}
.momart-cc-modal__close {
	position: absolute;
	top: .75rem;
	right: 1rem;
	background: none;
	border: 0;
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	color: var(--momart-cc-muted);
}
.momart-cc-modal__title { margin: 0 0 .75rem; font-size: 1.4rem; }
.momart-cc-modal__intro { margin: 0 0 1.25rem; color: var(--momart-cc-muted); font-size: 15px; line-height: 1.6; }
.momart-cc-modal__intro a { color: var(--momart-cc-accent); text-decoration: underline; }
.momart-cc-modal__subtitle { margin: 1.25rem 0 .75rem; font-size: 1.05rem; }

/* ----- Categories ----------------------------------------------------- */
.momart-cc-cat {
	border: 1px solid var(--momart-cc-border);
	border-radius: var(--momart-cc-radius);
	padding: .9rem 1rem;
	margin-bottom: .75rem;
}
.momart-cc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: .4rem;
}
.momart-cc-cat__name { font-weight: 600; font-size: 1rem; }
.momart-cc-cat__always { color: var(--momart-cc-muted); font-size: .85rem; font-style: italic; }
.momart-cc-cat__desc { margin: 0; color: var(--momart-cc-muted); font-size: 14px; line-height: 1.55; }

/* ----- Switch toggle -------------------------------------------------- */
.momart-cc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.momart-cc-switch input { opacity: 0; width: 0; height: 0; }
.momart-cc-switch__slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #cfcfcf;
	border-radius: 26px;
	transition: background .2s ease;
}
.momart-cc-switch__slider::before {
	content: "";
	position: absolute;
	height: 20px;
	width: 20px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s ease;
}
.momart-cc-switch input:checked + .momart-cc-switch__slider { background: var(--momart-cc-accent); }
.momart-cc-switch input:checked + .momart-cc-switch__slider::before { transform: translateX(20px); }
.momart-cc-switch input:disabled + .momart-cc-switch__slider { cursor: not-allowed; }

.momart-cc-modal__actions {
	display: flex;
	gap: .6rem;
	flex-wrap: wrap;
	margin-top: 1.25rem;
}

/* ----- Floating "cookie settings" button ----------------------------- */
.momart-cc-float[hidden] { display: none; }
.momart-cc-float {
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: calc(var(--momart-cc-z) - 1);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid var(--momart-cc-accent);
	background: var(--momart-cc-accent);
	color: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
	cursor: pointer;
	font-size: 1.4rem;
	line-height: 1;
	transition: transform .15s ease, box-shadow .15s ease;
}
.momart-cc-float:hover {
	transform: scale(1.06);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

/* ----- Inline link (shortcode) --------------------------------------- */
.momart-cc-link {
	background: none;
	border: 0;
	padding: 0;
	color: var(--momart-cc-accent);
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

/* ----- Responsive ----------------------------------------------------- */
@media (max-width: 640px) {
	.momart-cc-banner__inner { flex-direction: column; align-items: stretch; }
	.momart-cc-banner__actions { justify-content: stretch; }
	.momart-cc-banner__actions .momart-cc-btn { flex: 1 1 auto; }
	.momart-cc-modal__actions .momart-cc-btn { flex: 1 1 auto; }
}
