/* ==================================================================
   Fwdia public micro-site base. Themed entirely via CSS custom
   properties injected per-site (see SiteRenderer::themeCss).
   ================================================================== */

/* Corner radius: --fw-radius (theme setting) for cards, buttons and media;
   --fw-radius-inner for pieces nested inside a card (fields, chips,
   thumbnails). Circles and pills are deliberate shapes and stay as they are. */
:root { --fw-radius-inner: calc(var(--fw-radius, 14px) * .6); }

* { box-sizing: border-box; }
/* In-page links (menus, anchors): smooth, and stop below a sticky menu */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.fw-el[id] { scroll-margin-top: 16px; }
body:has(.fw-menu-sticky) .fw-el[id] { scroll-margin-top: 72px; }
html { -webkit-text-size-adjust: 100%; }
body.fw-site {
    margin: 0; background: var(--fw-bg); color: var(--fw-text);
    font-family: var(--fw-font); font-size: 16.5px; line-height: 1.55;
    overflow-x: clip; /* full-width section bands use 100vw, which includes the scrollbar */
}
.fw-page {
    --fw-page-top: 28px;
    max-width: var(--fw-maxw); margin: 0 auto; min-height: 100vh;
    display: flex; flex-direction: column; padding: var(--fw-page-top) var(--fw-gutter, 18px) 20px;
}
.fw-content { display: flex; flex-direction: column; gap: var(--fw-gap, 18px); flex: 1; text-align: center; }
.fw-el { min-width: 0; }
img { max-width: 100%; }
a { color: var(--fw-accent); }

/* alignment helpers */
.fw-align-left { text-align: left; }
.fw-align-center { text-align: center; }
.fw-align-right { text-align: right; }
.fw-muted { color: var(--fw-muted); }

/* headings */
.fw-heading { margin: 0; line-height: 1.15; letter-spacing: -0.015em; }
/* Theme "heading font" (falls back to the body font) for every title-like text */
.fw-heading, .fw-content h1, .fw-content h2, .fw-content h3, .fw-content h4,
.fw-form-title, .fw-upload-title, .fw-contact-name, .fw-hero-name,
.fw-mediacard-heading, .fw-spotlight-title {
    font-family: var(--fw-font-heading, var(--fw-font));
}
.fw-heading, .fw-content h1, .fw-content h2, .fw-content h3, .fw-content h4 { font-weight: var(--fw-heading-weight, 700); }
.fw-heading-display { font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.08; letter-spacing: -0.025em; }
.fw-heading-xl { font-size: 2.3rem; }
.fw-heading-accent { color: var(--fw-accent); }
.fw-heading-lg { font-size: 1.7rem; }
.fw-heading-md { font-size: 1.25rem; }

.fw-text p { margin: 0 0 .6em; }
.fw-text p:last-child { margin-bottom: 0; }
.fw-text-sm { font-size: .88rem; }
.fw-text-lg { font-size: 1.2rem; }

/* buttons (shared by several elements) */
.fw-button {
    display: inline-block; text-decoration: none; font-weight: 700; cursor: pointer;
    padding: 13px 26px; border-radius: var(--fw-radius); border: 2px solid var(--fw-accent);
    font-size: 1rem; font-family: inherit; transition: transform .12s ease, opacity .12s ease;
}
.fw-button:hover { transform: translateY(-1px); }
.fw-button-solid { background: var(--fw-accent); color: var(--fw-accent-text); }
.fw-button-outline { background: transparent; color: var(--fw-accent); }
.fw-button-soft { background: color-mix(in srgb, var(--fw-accent) 13%, transparent); color: var(--fw-accent); border-color: transparent; }
.fw-button-full { display: block; width: 100%; text-align: center; }
.fw-button[disabled] { opacity: .55; cursor: not-allowed; }

/* images */
.fw-image { border-radius: var(--fw-radius); display: inline-block; }
.fw-image-square { border-radius: 0; }
.fw-image-rounded { border-radius: calc(var(--fw-radius) * 1.6); }
.fw-image-circle { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.fw-image-placeholder {
    padding: 40px 16px; border: 2px dashed color-mix(in srgb, var(--fw-text) 25%, transparent);
    border-radius: var(--fw-radius); color: var(--fw-muted);
}

/* dividers */
.fw-divider { border: 0; border-top: 2px solid color-mix(in srgb, var(--fw-text) 18%, transparent); margin: 6px auto; }
.fw-divider-dashed { border-top-style: dashed; }
.fw-divider-dots { color: var(--fw-muted); letter-spacing: .5em; font-weight: 700; }

/* header / nav */
.fw-site-header { margin-bottom: 18px; }
.fw-site-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; }
.fw-site-nav a {
    text-decoration: none; color: var(--fw-muted); font-weight: 600; font-size: .92rem;
    padding: 6px 10px; border-radius: 999px;
}
.fw-site-nav a.active, .fw-site-nav a:hover { color: var(--fw-accent); background: color-mix(in srgb, var(--fw-accent) 10%, transparent); }

/* verified mark: a small pill in the footer (next to "made with fwdia"), the
   same quiet style as the branding pill; the badge itself is always Fwdia blue.
   A tap opens a short note above it. */
.fw-verified { position: relative; font-size: .8rem; line-height: 1.3; }
.fw-verified summary {
    display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px 6px 9px; border-radius: 999px; cursor: pointer;
    list-style: none; color: var(--fw-muted); -webkit-tap-highlight-color: transparent;
    border: 1px solid color-mix(in srgb, var(--fw-text) 14%, transparent); background: color-mix(in srgb, var(--fw-text) 3%, transparent);
}
.fw-verified summary::-webkit-details-marker { display: none; }
.fw-verified summary:hover, .fw-verified[open] summary { border-color: #1d8cf8; color: var(--fw-text); }
.fw-verified summary:focus-visible { outline: 2px solid #1d8cf8; outline-offset: 2px; }
.fw-verified-badge { flex: none; display: block; }
.fw-verified-note {
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 30;
    width: max-content; max-width: min(260px, 80vw); margin: 0; padding: 8px 12px; border-radius: 10px;
    font-size: .78rem; text-align: center; color: var(--fw-text); background: var(--fw-surface);
    border: 1px solid color-mix(in srgb, var(--fw-text) 12%, transparent); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .35);
}
.fw-site-footer .fw-verified + .fw-branding { margin-left: -4px; }

/* footer branding: a pill between two hairlines */
.fw-site-footer {
    margin-top: var(--fw-footer-gap, 34px); display: flex; align-items: center; gap: 12px;
    padding: 0 9px; text-align: center;
}
.fw-site-footer::before, .fw-site-footer::after {
    content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--fw-text) 12%, transparent);
}
.fw-branding {
    display: inline-block; text-decoration: none; color: var(--fw-muted); font-size: .8rem;
    padding: 7px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--fw-text) 14%, transparent);
    background: color-mix(in srgb, var(--fw-text) 3%, transparent);
}
.fw-branding b { color: var(--fw-text); }
.fw-branding-arrow { color: var(--fw-accent); }
.fw-branding:hover { border-color: var(--fw-accent); }

/* builder-preview niceties */
/* Short status note at the bottom of the screen ("Link copied", and in
   template previews "Links open on your real page"). */
.fw-icon-note {
    position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translateX(-50%);
    max-width: calc(100% - 32px); width: max-content; text-align: center;
    padding: 9px 16px; border-radius: 999px; font-size: .88rem; font-weight: 600;
    background: var(--fw-text); color: var(--fw-bg); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
}

body.fw-site-preview .fw-el { position: relative; cursor: pointer; }
/* ...but a sticky menu must stay sticky, or the preview cannot show it
   (sticky is also a positioned box, so the editor toolbar still anchors). */
body.fw-site-preview .fw-el-menu:has(> .fw-menu-sticky) { position: sticky; }
/* A Pro block on a site without Pro: kept in place in the builder, hidden for
   visitors (it is not rendered on the live page at all). */
body.fw-site-preview .fw-el-locked { outline: 2px dashed #f5a524; outline-offset: 3px; border-radius: 4px; }
body.fw-site-preview .fw-el-locked > :not(.fw-locked-badge) { opacity: .4; filter: grayscale(.7); }
.fw-locked-badge {
    position: absolute; top: 8px; left: 8px; z-index: 6; pointer-events: none;
    padding: 4px 10px; border-radius: 999px; background: #f5a524; color: #1d1405;
    font: 700 11px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; letter-spacing: .01em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
body.fw-site-preview .fw-el:hover { outline: 2px dashed color-mix(in srgb, var(--fw-accent) 55%, transparent); outline-offset: 3px; }
body.fw-site-preview .fw-el.fw-selected { outline: 2px solid var(--fw-accent); outline-offset: 3px; }
body.fw-site-preview .fw-el.fw-drag-over-before { box-shadow: 0 -3px 0 0 var(--fw-accent); }
body.fw-site-preview .fw-el.fw-drag-over-after { box-shadow: 0 3px 0 0 var(--fw-accent); }
body.fw-site-preview .fw-row-col:empty {
    min-height: 54px; border: 2px dashed color-mix(in srgb, var(--fw-text) 20%, transparent);
    border-radius: var(--fw-radius-inner);
}
body.fw-site-preview .fw-row-col.fw-drag-over-col { border-color: var(--fw-accent); background: color-mix(in srgb, var(--fw-accent) 6%, transparent); }

/* round outlined icon button (hero card, media cards) */
.fw-iconbtn {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 34px; height: 34px; border-radius: 50%;
    color: var(--fw-text); background: color-mix(in srgb, var(--fw-text) 3%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--fw-text) 22%, transparent);
    transition: border-color .12s ease, color .12s ease, transform .12s ease;
}
.fw-iconbtn:hover, .fw-iconbtn:focus-visible {
    color: var(--fw-accent); border-color: var(--fw-accent); transform: translateY(-1px);
}

/* ---------------------------------------------------------------- cookie choice (owner's own analytics only) */
.fw-consent {
    position: fixed; z-index: 1000; left: 50%; bottom: 16px; transform: translateX(-50%);
    width: min(560px, calc(100% - 24px)); padding: 16px 18px; border-radius: 14px;
    background: var(--fw-surface, #fff); color: var(--fw-text, #20241f);
    border: 1px solid color-mix(in srgb, var(--fw-text, #20241f) 14%, transparent);
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .35); font-family: var(--fw-font, inherit); font-size: .9rem; line-height: 1.5;
}
.fw-consent[hidden] { display: none; }
.fw-consent p { margin: 0 0 12px; }
.fw-consent a { color: inherit; text-decoration: underline; }
.fw-consent-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
/* both choices look the same: no nudging */
.fw-consent-btn {
    min-height: 40px; min-width: 110px; padding: 0 16px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600;
    background: var(--fw-accent, #0e5a43); color: var(--fw-accent-text, #fff); border: 0;
}
.fw-consent-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--fw-accent, #0e5a43) 45%, transparent); outline-offset: 2px; }
/* cookie choice button: over the left end of the footer line, centred on it; out of
   the flex flow, so the 'made with fwdia' badge stays centred on the page */
.fw-site-footer:has(.fw-consent-btn-icon) { position: relative; }
.fw-consent-btn-icon {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0; border-radius: 50%; cursor: pointer;
    color: var(--fw-muted, #6c7268); background: var(--fw-bg, #fff);
    border: 1px solid color-mix(in srgb, var(--fw-text, #20241f) 14%, transparent);
    transition: color .15s, background-color .15s;
}
.fw-consent-btn-icon:hover { color: var(--fw-text, #20241f); background: color-mix(in srgb, var(--fw-text, #20241f) 6%, var(--fw-bg, #fff)); }
.fw-consent-btn-icon:focus-visible { outline: 3px solid color-mix(in srgb, var(--fw-accent, #0e5a43) 45%, transparent); outline-offset: 2px; }
.fw-consent-btn-icon[hidden] { display: none; }
@media print { .fw-consent-btn-icon, .fw-consent { display: none; } }
@media (max-width: 480px) {
    .fw-consent { bottom: 10px; }
    .fw-consent-btn { flex: 1; }
}
.fw-site-footer:not(:has(.fw-branding, .fw-verified))::after { display: none; } /* only the cookie button: one continuous line */
.fw-site-footer:not(:has(.fw-branding, .fw-verified)) { min-height: 36px; }
