/**
 * Form errors, both forms (booking /rezervacni-formular/, contact /kontakt/).
 * Added 2026-12-01.
 *
 * functions.php turns Gravity Forms' own CSS off (gform_disable_css), and the
 * theme never replaced its error styling: the message under a field was plain
 * body-coloured 14px text, the red field border was commented out in
 * style.scss, and the summary at the top was a large uncoloured heading. The
 * tester could not tell what was wrong (test report 1 Dec 2026, items 3.3 and
 * 5.1: "no error, or not clear which part is wrong"; "they show, but are not
 * visible at first glance").
 *
 * One colour, a red dark enough to read as text on white (6.5:1) and on the
 * cream of the selects (5.9:1). Nothing here depends on the length or the
 * language of a message.
 */

:root {
    --tk-error: #B3261E;
    --tk-error-bg: #FBEDEC;
}

/* The box at the top of the form: heading plus, with the form's "validation
   summary" switched on, the list of fields that failed, each a link to it. */
.gform_wrapper .gform_validation_errors {
    margin: 0 0 2rem;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--tk-error);
    background: var(--tk-error-bg);
}

.gform_wrapper .gform_validation_errors .gform_submission_error {
    margin: 0;
    color: var(--tk-error);
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 400;
}

.gform_wrapper .gform_validation_errors ol {
    margin: .75rem 0 0;
    padding: 0 0 0 1.25rem;
}

.gform_wrapper .gform_validation_errors ol li,
.gform_wrapper .gform_validation_errors ol li a {
    color: var(--tk-error);
    font-size: 1rem;
    line-height: 1.6;
}

/* The message under a field. */
.gform_wrapper .gfield .validation_message,
.gform_wrapper .gfield .gfield_validation_message {
    color: var(--tk-error);
    font-weight: 500;
}

/* The field itself: a red frame around whatever it contains - an input, a
   select, the procedure list, the booking calendar, the consent box. */
.gform_wrapper .gfield_error input:not([type='checkbox']):not([type='radio']),
.gform_wrapper .gfield_error select,
.gform_wrapper .gfield_error textarea {
    outline: 2px solid var(--tk-error);
    outline-offset: -2px;
}

.gform_wrapper .gfield_error .gfield_radio,
.gform_wrapper .gfield_error .gfield_checkbox,
.gform_wrapper .gfield_error .ginput_container_consent,
.gform_wrapper .gfield_error .gpb-booking-time-picker {
    outline: 2px solid var(--tk-error);
    outline-offset: 6px;
}

.gform_wrapper .gfield_error .gfield_label {
    color: var(--tk-error);
}

/* -------------------------------------------------------------------------
 * Booking form 5, test 1 Dec 2026.
 * ---------------------------------------------------------------------- */

/* 9.11: the category select is where the booking starts - a gold frame and a
   larger, darker arrow, so it reads as a menu to open. */
.gform_wrapper .gform-body #field_5_4 .ginput_container select {
    border: 1px solid #C4A670;
    background-image: url(../img/select-gold.svg);
    background-size: 1.375rem auto;
    background-position: center right 1.25rem;
    padding-right: 3.5rem;
    cursor: pointer;
}
.gform_wrapper .gform-body #field_5_4 .ginput_container select:hover,
.gform_wrapper .gform-body #field_5_4 .ginput_container select:focus {
    border-color: #8C6D2F;
    box-shadow: 0 0 0 2px rgba(196, 166, 112, 0.35);
}

/* 9.18: the add-on checkboxes, one per line, with the notice under the label. */
.gform_wrapper .tk-addons .gfield_checkbox {
    display: grid;
    gap: 0.5rem;
}
.gform_wrapper .tk-addons .gchoice {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.gform_wrapper .tk-addons .gfield_description,
.gform_wrapper .tk-voucher .gfield_description {
    margin: 0.25rem 0 0.75rem;
    font-size: 0.875rem;
}

/* 9.15: on the manage-booking page the Change / Cancel buttons ran off a
   320-375px wide phone. Let every button row wrap. */
.gpb-manage .gpb-booking-actions,
.gpb-manage .gpb-booking-actions-group,
.gpb-manage .gpb-booking-buttons,
.gpb-manage .gpb-cancel-booking-actions,
.gpb-manage .gpb-confirm-buttons,
.gpb-manage .components-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
}
.gpb-manage .button,
.gpb-manage .components-button {
    max-width: 100%;
    white-space: normal;
    height: auto;
}
