/* EN: PLS request form (@requestForm.latte, js/request-form.js).
       Look 1:1 with the preview in zadani-poptavkovy-formular-pls.html.
       Everything is scoped under .request-form to beat the site styles
       (Open Sans, Bootstrap, reset in _general.scss) and not affect anything else.
   CZ: Poptávkový formulář PLS (@requestForm.latte, js/request-form.js).
       Vzhled 1:1 podle náhledu v zadani-poptavkovy-formular-pls.html.
       Vše je pod .request-form, aby to přebilo styly webu (Open Sans,
       Bootstrap, reset v _general.scss) a nic mimo formulář neovlivnilo. */

/* EN: Modal = .proto / CZ: Modal = .proto */

@media (min-width: 992px) {
    #demand-modal .modal-lg {
        max-width: 932px;
    }
}

#demand-modal .modal-content {
    padding: 30px;
    border: 1px solid #d9e2ef;
    border-radius: 12px;
}

/* EN: Base (.list) / CZ: Základ (.list) */

.request-form {
    color: #1b2432;
    font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    text-align: left;
}

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

.request-form h3 {
    margin: 0 0 26px;
    padding: 0;
    color: #1d4f91;
    font-family: inherit;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.request-form p {
    margin: 0 0 12px;
}

.request-form a {
    color: #0000ee;
    text-decoration: underline;
}

.request-form .skryto {
    display: none !important;
}

/* EN: Field wrapper for error messages – draws nothing itself.
   CZ: Obal pole kvůli chybovým hláškám – sám nic nekreslí. */
.request-form .form-group {
    position: static;
    margin: 0;
}

/* EN: Form body (.f) / CZ: Tělo formuláře (.f) */

.request-form .radek {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 26px;
}

@media (max-width: 640px) {
    .request-form .radek {
        grid-template-columns: 1fr;
    }
}

.request-form .f label {
    display: block;
    margin: 0 0 5px;
    padding: 0;
    color: #1b2432;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
}

.request-form .f .blok {
    margin-top: 18px;
}

.request-form .f > .blok:first-child {
    margin-top: 0;
}

.request-form .f .blok-sluzby {
    margin-top: 22px;
}

.request-form .f input,
.request-form .f textarea,
.request-form .f select {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 11px 12px;
    border: 0;
    border-radius: 4px;
    background: #e8f0fe;
    box-shadow: none;
    color: #1b2432;
    font: inherit;
    font-size: 14px;
    line-height: 1.6;
}

.request-form .f select {
    -webkit-appearance: auto;
    appearance: auto;
}

.request-form .f textarea {
    min-height: 110px;
    resize: vertical;
}

.request-form .hint {
    display: block;
    margin-top: 4px;
    color: #8795a8;
    font-size: 12.5px;
    font-weight: normal;
    line-height: 1.6;
}

.request-form p.hint {
    margin-bottom: 0;
}

/* EN: Tiles / CZ: Dlaždice */

/* EN: Two grid rows: the first holds titles, the second descriptions. Each tile
       spans both via subgrid, so descriptions start at the same height everywhere.
   CZ: Dva řádky mřížky: první drží názvy, druhý popisky. Dlaždice se přes ně
       rozkládá subgridem, takže popisek začíná všude stejně vysoko. */
.request-form .volby {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    gap: 14px;
    margin: 6px 0 20px;
}

@media (max-width: 900px) {
    .request-form .volby {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .request-form .volby {
        grid-template-columns: 1fr;
    }
}

.request-form .f label.volba {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding: 15px 16px;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #fff;
    color: #1b2432;
    font-size: 15px;
    font-weight: normal;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

@supports (grid-template-rows: subgrid) {
    .request-form .f label.volba {
        display: grid;
        grid-row: span 2;
        grid-template-rows: subgrid;
        row-gap: 4px;
    }
}

.request-form .f label.volba:hover {
    border-color: #4a90d9;
}

/* EN: Selected tile – border + inset shadow, no extra outline.
   CZ: Vybraná dlaždice – rámeček + vnitřní stín, bez dalšího obrysu. */
.request-form .f label.volba.is-selected {
    border-color: #1d4f91;
    background: #eef5ff;
    box-shadow: inset 0 0 0 1px #1d4f91;
}

/* EN: Outline only for keyboard focus (not after a mouse click –
       otherwise a double border appeared).
   CZ: Obrys jen při ovládání klávesnicí (po kliknutí myší ne –
       jinak vznikal dvojitý okraj). */
.request-form:not(.is-pointer) .f label.volba:has(.volba-input:focus-visible) {
    outline: 2px solid #4a90d9;
    outline-offset: 2px;
}

/* EN: The radio is visually hidden but still keyboard-focusable.
   CZ: Radio je vizuálně skryté, ale stále fokusovatelné z klávesnice. */
.request-form .f input.volba-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.request-form .volba b {
    display: block;
    align-self: start;
    margin-bottom: 3px;
    color: #1d4f91;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
}

.request-form .volba span {
    display: block;
    align-self: start;
    color: #4a5568;
    font-size: 13px;
    line-height: 1.45;
}

@supports not (grid-template-rows: subgrid) {
    .request-form .volba b {
        min-height: 2.6em;
    }
}

/* EN: Fieldset (branch) / CZ: Fieldset (větev) */

.request-form fieldset {
    min-width: 0;
    margin: 0 0 18px;
    padding: 18px 20px;
    border: 1px dashed #d9e2ef;
    border-radius: 9px;
}

.request-form legend {
    float: none;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 8px;
    color: #1d4f91;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
}

/* EN: Premises / CZ: Provozovny */

.request-form .provozovna {
    margin-bottom: 12px;
    padding: 16px 18px;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #fcfdff;
}

.request-form .provozovna h4 {
    margin: 0 0 12px;
    padding: 0;
    color: #1d4f91;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}

.request-form .pridat {
    padding: 9px 16px;
    border: 1px dashed #4a90d9;
    border-radius: 6px;
    background: #fff;
    color: #1d4f91;
    font: inherit;
    font-size: 14px;
    line-height: 1.6;
    cursor: pointer;
}

.request-form .pridat:hover {
    background: #eef5ff;
}

.request-form .odebrat {
    float: right;
    padding: 0;
    border: 0;
    background: none;
    color: #8795a8;
    font: inherit;
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
}

.request-form .odebrat:hover {
    color: #c0392b;
}

/* EN: Submit / CZ: Odeslat */

.request-form .odeslat {
    float: right;
    padding: 13px 38px;
    border: 0;
    border-radius: 6px;
    background: #4a90d9;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    cursor: pointer;
}

.request-form .odeslat:hover {
    background: #1d4f91;
}

/* EN: Errors / CZ: Chyby */

.request-form .form-message {
    position: static;
    color: #c0392b;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.6;
    text-align: left;
}

.request-form .form-message:empty {
    display: none;
}

.request-form .form-message-volby {
    margin: -14px 0 20px;
}

.request-form .has-error > input,
.request-form .has-error > select,
.request-form .has-error > textarea {
    box-shadow: inset 0 0 0 1px #c0392b;
}

.request-form .has-error .volba {
    border-color: #c0392b;
}
