/*
 * Developed by Zovanta Software Co.
 * Site: https://zovanta.dev
 * Support: sales@zovanta.deb
 * Copyright © 2026 Zovanta Software Co. All rights reserved.
 */

/* ZoForm public styles — every colour comes from the per-form theme variables. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--zf-font, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
    font-size: var(--zf-font-size, 16px);
    line-height: 1.6;
    color: var(--zf-text, #1f2937);
    background: var(--zf-page-bg, #f2f5fb);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--zf-link, #0f766e); }

.zf-page {
    width: 100%;
    max-width: calc(var(--zf-width, 640px) + 48px);
    margin: 0 auto;
    padding: 28px 24px 64px;
}

/* ---------- Site chrome ---------- */

.zf-site-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 2px 26px;
}

.zf-site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--zf-heading, #111827);
}

.zf-brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--zf-btn-bg, #0f766e);
    color: var(--zf-btn-text, #fff);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -.4px;
}

.zf-brand-name { font-weight: 700; letter-spacing: -.02em; font-size: 1.02rem; }

.zf-site-nav { display: flex; gap: 18px; font-size: .85rem; }
.zf-site-nav a { color: var(--zf-muted, #6b7280); text-decoration: none; }
.zf-site-nav a:hover { color: var(--zf-heading, #111827); }

/* ---------- Shell ---------- */

.zf-shell { width: 100%; display: flex; justify-content: center; }
.zf-shell-inner { width: 100%; max-width: var(--zf-width, 640px); display: flex; flex-direction: column; gap: var(--zf-gap, 18px); }

.zf-card {
    position: relative;
    background: var(--zf-card-bg, #fff);
    border: 1px solid var(--zf-card-border, #e2e8f2);
    border-radius: var(--zf-radius, 18px);
    box-shadow: var(--zf-card-shadow, 0 18px 45px -28px rgba(15,23,42,.35));
    padding: var(--zf-pad, 32px);
    overflow: hidden;
}

.zf-shell--bare .zf-card { background: transparent; border: 0; box-shadow: none; padding: 0; }

.zf-card-head { margin-bottom: 22px; text-align: var(--zf-align, left); }
.zf-title {
    margin: 0 0 8px;
    font-size: clamp(1.4rem, 1.1rem + 1vw, 1.75rem);
    line-height: 1.25;
    letter-spacing: -.02em;
    color: var(--zf-heading, #111827);
    font-weight: 700;
}
.zf-intro { margin: 0; color: var(--zf-muted, #6b7280); font-size: .94rem; }
.zf-card-head--embed { margin-bottom: 16px; }

.zf-progress {
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: transparent;
    overflow: hidden;
    opacity: 0;
    transition: opacity .2s ease;
}
.zf-progress span { display: block; width: 35%; height: 100%; background: var(--zf-progress, #22c7a9); transform: translateX(-100%); }
.zf-form.is-loading ~ .zf-progress,
.zf-card.is-loading .zf-progress { opacity: 1; }
.zf-card.is-loading .zf-progress span { animation: zf-slide 1.1s ease-in-out infinite; }
@keyframes zf-slide {
    0%   { transform: translateX(-100%); }
    60%  { transform: translateX(220%); }
    100% { transform: translateX(320%); }
}

/* ---------- Grid ---------- */

.zf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--zf-gap, 18px); }
.zf-col { min-width: 0; }
.zf-col--full { grid-column: 1 / -1; }

.zf-field { display: flex; flex-direction: column; gap: 7px; }
.zf-label {
    font-size: .84rem;
    font-weight: 600;
    color: var(--zf-label, #374151);
    letter-spacing: .005em;
}
.zf-req { color: var(--zf-error, #dc2626); font-weight: 700; margin-left: 2px; }
.zf-help { margin: 0; font-size: .78rem; color: var(--zf-help, #8b95a5); }
.zf-error { margin: 0; font-size: .78rem; font-weight: 500; color: var(--zf-error, #dc2626); }

/* ---------- Inputs ---------- */

.zf-field input[type="text"],
.zf-field input[type="email"],
.zf-field input[type="tel"],
.zf-field input[type="url"],
.zf-field input[type="number"],
.zf-field input[type="date"],
.zf-field input[type="time"],
.zf-field textarea,
.zf-field select,
.zf-address input,
.zf-address select {
    width: 100%;
    font: inherit;
    font-size: .94rem;
    color: var(--zf-input-text, #111827);
    background: var(--zf-input-bg, #fbfcfe);
    border: 1px solid var(--zf-input-border, #d6deea);
    border-radius: var(--zf-input-radius, 10px);
    padding: 0 13px;
    min-height: var(--zf-input-height, 46px);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    appearance: none;
}

.zf-field textarea { padding: 11px 13px; min-height: 120px; resize: vertical; line-height: 1.55; }

.zf-field input::placeholder,
.zf-field textarea::placeholder { color: var(--zf-input-placeholder, #9aa4b2); }

.zf-field input:focus,
.zf-field textarea:focus,
.zf-field select:focus,
.zf-address input:focus,
.zf-address select:focus {
    outline: none;
    border-color: var(--zf-focus, #22c7a9);
    box-shadow: 0 0 0 3px rgb(34 199 169 / .18);
    background: var(--zf-card-bg, #fff);
}

.zf-field.has-error input,
.zf-field.has-error textarea,
.zf-field.has-error select { border-color: var(--zf-error, #dc2626); }

.zf-field.has-error input:focus,
.zf-field.has-error textarea:focus,
.zf-field.has-error select:focus { box-shadow: 0 0 0 3px rgb(220 38 38 / .14); }

.zf-select-wrap { position: relative; }
.zf-select-wrap select { padding-right: 38px; cursor: pointer; }
.zf-chevron {
    position: absolute;
    right: 15px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--zf-muted, #6b7280);
    border-bottom: 2px solid var(--zf-muted, #6b7280);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

/* ---------- Choices ---------- */

.zf-options { display: flex; flex-direction: column; gap: 9px; }
.zf-options--inline { flex-direction: row; flex-wrap: wrap; gap: 10px 18px; }

.zf-choice {
    display: inline-flex;
    align-items: flex-start;
    gap: 9px;
    font-size: .92rem;
    color: var(--zf-text, #1f2937);
    cursor: pointer;
    user-select: none;
    line-height: 1.45;
}
.zf-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.zf-choice-dot,
.zf-choice-box {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 1.5px solid var(--zf-input-border, #d6deea);
    background: var(--zf-input-bg, #fbfcfe);
    border-radius: 50%;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.zf-choice-box { border-radius: 5px; }

.zf-choice input:checked + .zf-choice-dot {
    border-color: var(--zf-focus, #22c7a9);
    background: var(--zf-focus, #22c7a9);
    box-shadow: inset 0 0 0 3px var(--zf-card-bg, #fff);
}
.zf-choice input:checked + .zf-choice-box {
    border-color: var(--zf-focus, #22c7a9);
    background: var(--zf-focus, #22c7a9);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}
.zf-choice input:focus-visible + .zf-choice-dot,
.zf-choice input:focus-visible + .zf-choice-box { box-shadow: 0 0 0 3px rgb(34 199 169 / .22); }
.zf-choice--consent { font-size: .88rem; }
.zf-choice--consent .zf-choice-box { margin-top: 1px; }

/* ---------- Address block ---------- */

.zf-address { display: flex; flex-direction: column; gap: 10px; }
.zf-address-row { display: flex; flex-direction: column; gap: 5px; }
.zf-address-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zf-sublabel { font-size: .74rem; font-weight: 600; color: var(--zf-muted, #6b7280); }
.zf-address input,
.zf-address select { min-height: 42px; font-size: .9rem; }

/* ---------- Stars ---------- */

.zf-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.zf-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.zf-stars label {
    font-size: 1.7rem;
    line-height: 1;
    color: var(--zf-input-border, #d6deea);
    cursor: pointer;
    transition: color .12s ease, transform .12s ease;
}
.zf-stars label:hover,
.zf-stars label:hover ~ label,
.zf-stars input:checked ~ label { color: #f5b301; }
.zf-stars label:hover { transform: scale(1.08); }
.zf-stars input:focus-visible + label { outline: 2px solid var(--zf-focus, #22c7a9); outline-offset: 3px; }

/* ---------- File ---------- */

.zf-file { display: flex; flex-direction: column; gap: 6px; }
.zf-file input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.zf-file-face {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border: 1.5px dashed var(--zf-input-border, #d6deea);
    border-radius: var(--zf-input-radius, 10px);
    background: var(--zf-input-bg, #fbfcfe);
    font-size: .88rem;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.zf-file-face:hover { border-color: var(--zf-focus, #22c7a9); }
.zf-file input:focus-visible + .zf-file-face { outline: 2px solid var(--zf-focus, #22c7a9); outline-offset: 2px; }
.zf-file-btn {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 11px;
    border-radius: 8px;
    background: var(--zf-card-bg, #fff);
    border: 1px solid var(--zf-input-border, #d6deea);
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}
.zf-file-name { color: var(--zf-muted, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zf-file-hint { font-size: .74rem; color: var(--zf-help, #8b95a5); }

/* ---------- Text pieces ---------- */

.zf-section { margin: 6px 0 0; font-size: 1.02rem; color: var(--zf-heading, #111827); letter-spacing: -.01em; }
.zf-section-sub { margin: 2px 0 0; font-size: .84rem; color: var(--zf-muted, #6b7280); }
.zf-divider { border: 0; border-top: 1px solid var(--zf-card-border, #e2e8f2); margin: 6px 0; }
.zf-richtext { font-size: .88rem; color: var(--zf-muted, #6b7280); }
.zf-richtext a { color: var(--zf-link, #0f766e); }

.zf-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Captcha ---------- */

.zf-captcha-slot { margin-top: 20px; display: flex; justify-content: center; }
.zf-captcha { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.zf-captcha-note { margin: 0; font-size: .7rem; color: var(--zf-help, #8b95a5); }
.zf-captcha-missing {
    font-size: .8rem;
    color: var(--zf-error, #dc2626);
    background: var(--zf-error-bg, #fef2f2);
    border: 1px solid var(--zf-error, #dc2626);
    border-radius: 10px;
    padding: 9px 12px;
}

/* ---------- Submit ---------- */

.zf-actions { margin-top: 22px; display: flex; }
.zf-actions--full .zf-submit { width: 100%; }

.zf-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 26px;
    border: 0;
    border-radius: var(--zf-btn-radius, 10px);
    background: var(--zf-btn-bg, #0f766e);
    color: var(--zf-btn-text, #fff);
    font: inherit;
    font-weight: 650;
    font-size: .95rem;
    letter-spacing: .005em;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease, opacity .15s ease;
}
.zf-submit:hover:not(:disabled) { background: var(--zf-btn-hover, #115e59); color: var(--zf-btn-hover-text, #fff); }
.zf-submit:active:not(:disabled) { transform: translateY(1px); }
.zf-submit:disabled { opacity: .7; cursor: progress; }
.zf-submit:focus-visible { outline: 2px solid var(--zf-focus, #22c7a9); outline-offset: 3px; }

.zf-spinner {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: zf-spin .65s linear infinite;
}
.zf-form.is-loading .zf-spinner { display: inline-block; }
@keyframes zf-spin { to { transform: rotate(360deg); } }

.zf-privacy { margin: 14px 0 0; font-size: .72rem; color: var(--zf-help, #8b95a5); text-align: var(--zf-align, left); }

/* ---------- Alerts & success ---------- */

.zf-alert {
    margin-top: 18px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: .85rem;
    line-height: 1.5;
    border: 1px solid transparent;
}
.zf-alert.is-error { background: var(--zf-error-bg, #fef2f2); border-color: var(--zf-error, #dc2626); color: var(--zf-error, #dc2626); }
.zf-alert.is-ok { background: var(--zf-success-bg, #ecfdf5); border-color: var(--zf-success, #059669); color: var(--zf-success, #059669); }

.zf-done { text-align: center; padding: 14px 4px 6px; }
.zf-done-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--zf-success-bg, #ecfdf5);
    color: var(--zf-success, #059669);
    font-size: 24px;
    font-weight: 700;
    border: 1px solid var(--zf-success, #059669);
}
.zf-done h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--zf-heading, #111827); }
.zf-done p { margin: 0; color: var(--zf-muted, #6b7280); font-size: .9rem; }

.zf-footnote { margin: 4px 0 0; text-align: center; font-size: .74rem; color: var(--zf-help, #8b95a5); }
.zf-footnote a { color: inherit; }
.zf-footnote--credit { opacity: .75; }

/* ---------- Ads ---------- */

.zf-ad {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px dashed var(--zf-ad-border, #e5eaf2);
    border-radius: calc(var(--zf-radius, 18px) - 4px);
    background: var(--zf-ad-bg, #f8fafc);
    color: var(--zf-ad-text, #64748b);
    font-size: .8rem;
    text-align: center;
}
.zf-ad--form { margin-top: 20px; }
.zf-ad-label {
    font-size: .62rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--zf-ad-text, #64748b);
    opacity: .8;
}
.zf-ad-link { color: inherit; text-decoration: none; display: block; }
.zf-ad-link:hover { color: var(--zf-text, #1f2937); }
.zf-ad-copy { margin-top: 6px; font-size: .8rem; }

/* ---------- Home ---------- */

.zf-home-hero { padding: 18px 0 26px; }
.zf-home-hero h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); letter-spacing: -.03em; color: var(--zf-heading, #111827); }
.zf-home-hero p { margin: 0; color: var(--zf-muted, #6b7280); font-size: .98rem; }
.zf-home-h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--zf-muted, #6b7280); margin: 26px 0 0; }
.zf-home-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    border: 1px solid var(--zf-card-border, #e2e8f2);
    border-radius: 12px;
    background: var(--zf-card-bg, #fff);
    text-decoration: none;
    color: var(--zf-text, #1f2937);
    transition: border-color .15s ease, transform .15s ease;
}
.zf-home-link:hover { border-color: var(--zf-btn-bg, #0f766e); transform: translateY(-1px); }
.zf-home-link span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zf-home-link strong { font-size: .92rem; }
.zf-home-link em { font-style: normal; font-size: .78rem; color: var(--zf-muted, #6b7280); }
.zf-empty-home { text-align: center; }
.zf-empty-home h1,
.zf-empty-home h2 { margin: 0 0 8px; color: var(--zf-heading, #111827); }
.zf-empty-home p { margin: 0 0 18px; color: var(--zf-muted, #6b7280); }

/* ---------- Embed ---------- */

.zf-embed-body { background: transparent; }
.zf-embed-body .zf-shell { padding: 0; }
.zf-embed-body .zf-shell-inner { max-width: 100%; }

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
    .zf-page { padding: 18px 14px 44px; }
    .zf-card { padding: min(var(--zf-pad, 32px), 22px); border-radius: min(var(--zf-radius, 18px), 16px); }
    .zf-grid { grid-template-columns: minmax(0, 1fr); }
    .zf-col--half { grid-column: 1 / -1; }
    .zf-site-nav { gap: 12px; font-size: .8rem; }
    .zf-address-split { grid-template-columns: 1fr; }
    .zf-actions--full .zf-submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ======================= Site chrome + colour mode ======================= */

:root {
    --zf-ui-bg: #f2f5fb; --zf-ui-card: #ffffff; --zf-ui-ink: #111827;
    --zf-ui-muted: #6b7280; --zf-ui-line: #e2e8f2; --zf-ui-chip: #eef2f8;
    color-scheme: light;
}
html[data-zf-mode="dark"] {
    --zf-ui-bg: #0a1019; --zf-ui-card: #111a2a; --zf-ui-ink: #f1f5f9;
    --zf-ui-muted: #93a2b8; --zf-ui-line: #223049; --zf-ui-chip: #162033;
    color-scheme: dark;
}
/* Native select popups: the list is drawn by the browser, so the options need
   their own colours or they appear white on white in dark mode. */
html[data-zf-mode="dark"] select { color-scheme: dark; }
html[data-zf-mode="dark"] select option,
html[data-zf-mode="dark"] select optgroup { background-color: #111a2a; color: #f1f5f9; }
html[data-zf-mode="dark"] select option:checked,
html[data-zf-mode="dark"] select option:hover { background-color: #1f3350; color: #ffffff; }
html[data-zf-mode="dark"] .zf-shell select option { background-color: var(--zf-input-bg, #111a2a); color: var(--zf-input-text, #f1f5f9); }
html[data-zf-mode="dark"] .zf-shell select option:checked,
html[data-zf-mode="dark"] .zf-shell select option:hover { background-color: var(--zf-button-bg, #1f3350); color: var(--zf-button-text, #ffffff); }

body { background: var(--zf-ui-bg); }

.zf-mode-btn {
    display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
    border: 1px solid var(--zf-ui-line); border-radius: 10px; background: var(--zf-ui-card);
    color: var(--zf-ui-ink); cursor: pointer; line-height: 0;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.zf-mode-btn:hover { border-color: #a9b6c9; }
.zf-mode-btn:focus-visible { outline: 2px solid var(--zf-link, #22c7a9); outline-offset: 2px; }
.zf-mode-glyph { display: none; }
html[data-zf-mode="dark"] .zf-mode-glyph--sun { display: block; }
html[data-zf-mode="light"] .zf-mode-glyph--moon { display: block; }
html:not([data-zf-mode]) .zf-mode-glyph--moon { display: block; }
.zf-site-nav { align-items: center; gap: 14px; }

html[data-zf-mode="dark"] .zf-site-brand,
html[data-zf-mode="dark"] .zf-home-hero h1,
html[data-zf-mode="dark"] .zf-home-h2 { color: var(--zf-ui-ink); }
html[data-zf-mode="dark"] .zf-site-nav a { color: var(--zf-ui-muted); }
html[data-zf-mode="dark"] .zf-site-nav a:hover { color: var(--zf-ui-ink); }
html[data-zf-mode="dark"] .zf-home-hero p { color: var(--zf-ui-muted); }
html[data-zf-mode="dark"] .zf-home-link { background: var(--zf-ui-card); border-color: var(--zf-ui-line); color: var(--zf-ui-ink); }
html[data-zf-mode="dark"] .zf-home-link em { color: var(--zf-ui-muted); }
html[data-zf-mode="dark"] .zf-home-link:hover { border-color: #33507a; }
html[data-zf-mode="dark"] .zf-empty-home { background: var(--zf-ui-card); }
html[data-zf-mode="dark"] .zf-footnote { color: var(--zf-ui-muted); }
html[data-zf-mode="dark"] .zf-mode-btn { background: #162033; border-color: #2a3a53; color: #dbe6f5; }
