/*
 * Календарь полей [date] в формах (js/datepicker.js).
 *
 * Поле-кнопка намеренно носит класс .wpcf7-form-control: так оно получает то же
 * оформление, что и остальные поля формы (css/ux.css), включая правила для
 * модального окна, и не расходится с ними при правках.
 */

.ffj-date {
    position: relative;
    display: block;
}

.ffj-date > input[type="date"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.ffj-date__field {
    padding-right: 42px !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c5371' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px 18px;
}

/*
 * fixed, а не absolute: в модальном окне заявки форма прокручивается внутри
 * .modal-body с overflow, и обычный выпадающий блок обрезался бы его краем.
 * Координаты ставит js/datepicker.js, z-index выше модального окна (1050).
 */
.ffj-date__popup {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1060;
    width: 300px;
    max-width: 100%;
    padding: 14px;
    background: #fff;
    border: 1px solid #d9e2ea;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(28, 83, 113, 0.16);
}

.ffj-date__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ffj-date__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ffj-blue-02);
}

.ffj-date__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 13px;
    color: var(--ffj-blue-01);
    background: transparent;
    border: 1px solid #d9e2ea;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ffj-date__nav:hover {
    background: #f2f7fb;
    border-color: var(--ffj-blue-01);
}

.ffj-date__nav:focus-visible {
    outline: 0;
    border-color: var(--ffj-blue-01);
    box-shadow: 0 0 0 3px rgba(28, 83, 113, 0.12);
}

.ffj-date__week,
.ffj-date__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.ffj-date__week {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9aa3b2;
}

.ffj-date__day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0;
    font-family: inherit;
    font-size: 14px;
    color: #24262b;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ffj-date__day:hover {
    background: #f2f7fb;
}

.ffj-date__day:focus-visible {
    outline: 0;
    border-color: var(--ffj-blue-01);
    box-shadow: 0 0 0 3px rgba(28, 83, 113, 0.12);
}

/* Дни соседних месяцев видны, но не тянут внимание. */
.ffj-date__day.is-outside {
    color: #c3cad6;
}

.ffj-date__day.is-today {
    font-weight: 700;
    color: var(--ffj-blue-01);
    border-color: #d9e2ea;
}

.ffj-date__day.is-selected,
.ffj-date__day.is-selected:hover {
    color: #fff;
    font-weight: 600;
    background: var(--ffj-blue-01);
    border-color: var(--ffj-blue-01);
}

.ffj-date__day[disabled] {
    color: #d4dae3;
    cursor: default;
    background: transparent;
}

@media (max-width: 575px) {
    .ffj-date__day {
        height: 40px;
    }
}
