/* Formulář přebírá vzhled veřejného webu RDCJK – stejná paleta i písma jako
   modules/sprava_webu/public/assets/css/theme-rdcjk.css. Modul původně nosil
   modrý vzhled projektu, ze kterého sem byl přenesený; barvy drží tenhle
   jediný blok proměnných, takže se zbytek souboru nemusel sahat. */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap&subset=latin-ext');

* { box-sizing: border-box; }

:root {
    /* fialová paleta RDCJK */
    --admin-bg: #f4f0fb;
    --admin-card: #ffffff;
    --admin-text: #2b1b60;
    --admin-muted: #5a3db3;
    --admin-soft: #b9a7e8;
    --admin-border: #e6ddf5;
    --admin-border-soft: #f4f0fb;
    --admin-primary: #2b1b60;
    --admin-primary-hover: #5a3db3;
    --admin-primary-soft: #f7e1fb;
    --admin-success: #1f9d55;
    --admin-success-soft: #eaf8ef;
    --admin-danger: #ef4444;
    --admin-danger-soft: #fff0f0;
    --admin-radius-sm: 10px;
    --admin-radius-md: 14px;
    --admin-radius-lg: 24px;
    --admin-shadow-md: 0 24px 50px rgba(43, 27, 96, 0.08);
    --admin-transition: 160ms ease;
}

.fm-body {
    margin: 0;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
}

.fm-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    overflow: hidden;
}

/* ─── Plovoucí ikony na pozadí (stejný jazyk jako admin/login) ──────── */

.fbg-icons {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.fbg-icon {
    position: absolute;
    color: transparent;
    -webkit-text-stroke: 1px var(--admin-primary);
    transform: rotate(var(--fbg-icon-rotate, 0deg));
    animation-name: fbg-icon-float;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

@keyframes fbg-icon-float {
    0%, 100% {
        transform: rotate(var(--fbg-icon-rotate, 0deg)) translateY(0);
    }
    50% {
        transform: rotate(calc(var(--fbg-icon-rotate, 0deg) + 5deg)) translateY(-16px);
    }
}

/* ─── Značka webu (nahoře uvnitř karty) ──────────────────────────────── */

.fbrand {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    text-align: center;
}

.fbrand__logo {
    max-height: 44px;
    width: auto;
    object-fit: contain;
}

.fbrand__fallback {
    font-size: 20px;
    font-weight: 800;
    color: var(--admin-primary);
}

.fbrand__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--admin-soft);
    padding: 6px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    background: #ffffff;
}

.fm-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    background: var(--admin-card);
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    box-shadow: 0 0 0 1px rgba(21, 93, 252, 0.08), 0 25px 70px rgba(21, 93, 252, 0.16), 0 0 90px rgba(59, 130, 246, 0.1);
    padding: 48px;
}

.fm-header h1 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.fm-description {
    margin: 0 0 24px;
    color: var(--admin-muted);
    font-size: 15px;
    line-height: 1.6;
}

.fm-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--admin-danger-soft);
    border: 1px solid rgba(239, 68, 68, 0.24);
    color: #b91c1c;
    border-radius: var(--admin-radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

.fm-alert i {
    margin-top: 2px;
}

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

.fm-field {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.fm-label {
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--admin-text);
}

.field-required .fm-label::after {
    content: ' *';
    color: var(--admin-danger);
}

.fm-help {
    margin: -2px 0 0;
    font-size: 13px;
    color: var(--admin-muted);
}

.fm-field__meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-top: -2px;
}

.form-counter {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 11px;
    line-height: 1.45;
    color: var(--admin-soft);
    white-space: nowrap;
}

.form-counter.is-limit {
    color: #f97316;
}

.fm-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #d8e0ec;
    border-radius: var(--admin-radius-md);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    color: var(--admin-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--admin-transition), box-shadow var(--admin-transition);
    appearance: none;
}

.fm-input:hover {
    border-color: var(--admin-soft);
}

.fm-input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 4px rgba(21, 93, 252, 0.1);
}

textarea.fm-input {
    min-height: 96px;
    padding-top: 12px;
    padding-bottom: 12px;
    resize: vertical;
}

.fm-select-wrap {
    position: relative;
    display: block;
}

.fm-select-wrap .fm-input {
    padding-right: 40px;
}

.fm-select-icon {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--admin-soft);
    pointer-events: none;
}

.fm-choice-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ─── Radio / checkbox (stejné vzory jako v adminu) ─────────────────── */

.radio,
.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--admin-text);
    cursor: pointer;
    padding: 10px 12px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    transition: border-color var(--admin-transition), background-color var(--admin-transition);
}

.radio:has(input:checked),
.check:has(input:checked) {
    border-color: var(--admin-primary);
    background: var(--admin-primary-soft);
}

.radio input,
.check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-mark,
.check-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 1px solid #c7d3e2;
    background: #ffffff;
    transition: border-color var(--admin-transition), background-color var(--admin-transition);
}

.check-box { border-radius: 6px; }
.radio-mark { border-radius: 50%; }

.check-box::after,
.radio-mark::after {
    content: '';
    transform: scale(0);
    transition: transform var(--admin-transition);
}

.check-box::after {
    width: 5px;
    height: 9px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
}

.radio-mark::after {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
}

.radio input:checked + .radio-mark,
.check input:checked + .check-box {
    border-color: var(--admin-primary);
    background: var(--admin-primary);
}

.radio input:checked + .radio-mark::after {
    transform: scale(1);
}

.check input:checked + .check-box::after {
    transform: rotate(45deg) scale(1);
}

/* ─── Tlačítka (stejné vzory jako v adminu) ──────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--admin-radius-sm);
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--admin-transition), color var(--admin-transition), border-color var(--admin-transition);
}

.btn-lg {
    min-height: 48px;
    padding: 0 22px;
    font-size: 15px;
    width: 100%;
    margin-top: 8px;
}

.btn-primary {
    background: var(--admin-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--admin-primary-hover);
}

.fm-success {
    text-align: center;
    padding: 24px 0;
}

.fm-success__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--admin-success-soft);
    color: var(--admin-success);
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.fm-success h1 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
}

.fm-success p {
    color: var(--admin-muted);
    font-size: 15px;
    margin: 0;
}

@media (max-width: 480px) {
    .fm-card {
        padding: 28px 20px;
    }
}

/* Nadpisy na Poppins se záporným prostrkáním – stejně jako nadpisy bloků
   na veřejném webu (theme-rdcjk.css). */
.fm-header h1,
.fm-success h1 {
    font-family: 'Poppins', 'Nunito', sans-serif;
    letter-spacing: -0.03em;
}

.fm-brand-eyebrow,
.fm-eyebrow {
    font-family: 'Poppins', 'Nunito', sans-serif;
}

/* Informační blok mezi otázkami – úvodní vysvětlení, podmínky, souhlas se
   zpracováním údajů na konci. Nic nesbírá, proto se vizuálně odlišuje od
   otázek: jemné fialové pozadí místo bílého pole. */
.fm-info {
    margin: 4px 0 8px;
    padding: 18px 20px;
    border-radius: var(--admin-radius-md);
    background: var(--admin-primary-soft);
    border: 1px solid var(--admin-border);
}

.fm-info__title {
    margin: 0 0 8px;
    font-family: 'Poppins', 'Nunito', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--admin-text);
}

.fm-info__text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--admin-muted);
}

.fm-info__title + .fm-info__text {
    margin-top: 0;
}
