/**
 * Cookie consent banner + settings dialog (inc/consent.php, assets/js/consent.js).
 * Mockup: docs/mockup/cookie-banner.html (variant A, revised 2026-10-30).
 * The cards are .light-surface, so the --fcb-* tokens resolve to the white set.
 * Buttons and links are pinned against the parent theme's global button and
 * cyan a:hover rules.
 */

/* Banner: a compact centred card, floating above the bottom sticky ad.
   --fcc-above is that ad's height, set live by consent.js (0 when none). */
.fc-consent { --fcc-gap: 12px; position: fixed; z-index: 99995; left: var(--fcc-gap); right: var(--fcc-gap); bottom: calc(var(--fcc-above, 0px) + var(--fcc-gap)); font-family: 'Poppins', sans-serif; pointer-events: none; }
.fc-consent[hidden], .fc-consent-dlg[hidden] { display: none; }
.fc-consent__card { pointer-events: auto; max-width: 600px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 16px 16px 16px 18px; background: var(--fcb-card); color: var(--fcb-text-soft); border: 1px solid var(--fcb-border); border-radius: var(--fcb-radius); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35); }
.fc-consent__body { flex: 1 1 auto; min-width: 0; }
.fc-consent__title { font-family: var(--fcb-font-display); font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--fcb-text); margin: 0 0 4px; }
.fc-consent__text { font-size: 13px; line-height: 1.55; margin: 0; color: var(--fcb-text-soft); }
.fc-consent__links { font-size: 12.5px; line-height: 1.5; margin-top: 6px; color: var(--fcb-text-mute); }
.fc-consent__links a,
.fc-consent__links a:hover,
.fc-consent__links button,
.fc-consent__links button:hover,
.fc-consent-dlg__foot a,
.fc-consent-dlg__foot a:hover { color: var(--fcb-accent-text); text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; box-shadow: none; height: auto; text-transform: none; letter-spacing: normal; }

.fc-consent__btns { flex: 0 0 152px; display: flex; flex-direction: column; gap: 8px; }
.fc-consent__btn,
.fc-consent__btn:hover,
.fc-consent__btn:focus { width: 100%; min-width: 0; height: auto; margin: 0; padding: 0.7rem 1rem; border: 0; border-radius: 10px; background: var(--fcb-text); color: #fff; font: 600 13.5px/1.2 'Poppins', sans-serif; text-transform: none; letter-spacing: normal; white-space: nowrap; cursor: pointer; box-shadow: none; }
.fc-consent__btn:hover { background: #1e293b; }
.fc-consent__btn:focus-visible,
.fc-toggle:focus-visible { outline: 2px solid var(--fcb-accent-text); outline-offset: 2px; }

/* Phones: buttons side by side under the text (stacking there makes it taller). */
@media (max-width: 640px) {
	.fc-consent__card { display: block; padding: 16px; }
	.fc-consent__btns { flex-direction: row; margin-top: 12px; }
	.fc-consent__btn { flex: 1 1 0; }
}

/* Settings dialog: centred card on desktop, bottom sheet on phones. */
.fc-consent-dlg { position: fixed; inset: 0; z-index: 99999; background: rgba(2, 6, 23, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; font-family: 'Poppins', sans-serif; }
.fc-consent-dlg__card { width: 520px; max-width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--fcb-card); color: var(--fcb-text-soft); border-radius: var(--fcb-radius-lg); padding: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); }
.fc-consent-dlg__title { font-family: var(--fcb-font-display); font-weight: 800; font-size: 20px; line-height: 1.25; color: var(--fcb-text); margin: 0 0 4px; }
.fc-consent-dlg__intro { font-size: 13px; line-height: 1.55; margin: 0 0 12px; }
.fc-consent-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--fcb-border); }
.fc-consent-row__main { flex: 1 1 auto; }
.fc-consent-row__name { font-weight: 600; font-size: 14px; color: var(--fcb-text); }
.fc-consent-row__desc { font-size: 12.5px; line-height: 1.5; margin-top: 2px; }
.fc-consent-row__fixed { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fcb-text-mute); padding-top: 3px; white-space: nowrap; }
.fc-toggle,
.fc-toggle:hover,
.fc-toggle:focus { flex: 0 0 auto; position: relative; width: 42px; height: 24px; min-width: 0; margin: 2px 0 0; padding: 0; border: 0; border-radius: 999px; background: var(--fcb-text-faint); cursor: pointer; box-shadow: none; }
.fc-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: left 0.15s; }
.fc-toggle[aria-checked="true"] { background: var(--fcb-accent-text); }
.fc-toggle[aria-checked="true"]::after { left: 21px; }
.fc-consent__btns--row { flex: none; flex-direction: row; margin-top: 14px; }
.fc-consent__btns--row .fc-consent__btn { flex: 1 1 0; width: auto; }
.fc-consent-dlg__foot { font-size: 12px; line-height: 1.5; margin: 10px 0 0; color: var(--fcb-text-mute); }
@media (max-width: 640px) {
	.fc-consent-dlg { align-items: flex-end; padding: 0; }
	.fc-consent-dlg__card { border-radius: var(--fcb-radius-lg) var(--fcb-radius-lg) 0 0; padding: 20px 16px 18px; max-height: 90vh; }
}
