/* =========================================
   AirDatepicker — FINAL BUILD (Mobile Safe)
========================================= */

.air-datepicker {
    width: 360px !important;
    max-width: 360px !important;

    background: #1f1f1f !important;
    border: 1px solid #2b2b2b !important;
    border-radius: 18px !important;
    padding: 12px !important;

    box-shadow:
        0 12px 34px rgba(0,0,0,0.55),
        0 0 0 1px rgba(255,255,255,0.04) inset !important;

    color: #f4f4f4 !important;
    font-family: -apple-system, "SF Pro Text", sans-serif !important;
}

.air-datepicker--pointer { display: none !important; }

/* ==============================
   Навигация
============================== */

.air-datepicker-nav {
    background: #1f1f1f !important;
    border-bottom: 1px solid #2c2c2c !important;
    padding: 14px !important;
}

.air-datepicker-nav--title {
    background: #2b2b2b !important;
    border-radius: 10px !important;
    padding: 6px 14px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    transition: 0.15s;
}

.air-datepicker-nav--title:hover {
    background: #3a3a3a !important;
}

.air-datepicker-nav--action {
    background: #2b2b2b !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: 0.2s ease !important;
}

.air-datepicker-nav--action:hover {
    background: #3a3a3a !important;
    transform: scale(1.08);
}

/* ==============================
       Сетка дней
============================== */

.air-datepicker-body--day-name {
    color: #aaaaaa !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.air-datepicker-cell {
    color: #f4f4f4 !important;
    border-radius: 12px !important;
    transition: 0.15s ease;
}

.air-datepicker-cell:hover {
    background: #333333 !important;
}

/* Сегодняшний день — без фона, только рамка */
.air-datepicker-cell.-current- {
    background: none !important;                 /* Без фона */
    border: 1px solid rgba(255,255,255,0.28) !important; /* Аккуратная окантовка */
    color: #ffffff !important;
    font-weight: 600 !important;
}


.air-datepicker-cell.-selected- {
    background: #1d74e4 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 0 10px rgba(30,110,220,0.6) !important;
}

.air-datepicker-cell.-selected-:hover {
    background: #1664c8 !important;
}

.air-datepicker-cell.-other-month- {
    opacity: 0.32 !important;
    color: #555 !important;
}

.air-datepicker-cell.-disabled- {
    opacity: 0.18 !important;
}

.air-datepicker-cell.-weekend- {
    color: #ff7676 !important;
}

/* ==========================================================
   КНОПКИ — текстовые, равномерное расстояние
========================================================== */
/* Обёртка кнопок */
.air-datepicker--buttons {
    display: flex !important;
    justify-content: center !important; /* Центруем группу */
    padding: 16px 20px !important;
    border-top: 1px solid #2c2c2c !important;
}

/* Внутренний контейнер кнопок — УВЕЛИЧЕННАЯ ШИРИНА */
.air-datepicker--buttons > div {
    display: flex !important;
    justify-content: space-between !important; /* Максимальный разлёт */
    width: 100% !important;

    max-width: 330px !important;  /* ← УВЕЛИЧИЛ! Было 280px */
}

/* Кнопки — текстовые */
.air-datepicker-button {
    background: none !important;
    border: none !important;
    padding: 8px 4px !important;

    font-size: 15px !important;
    font-weight: 500 !important;
    color: #64aaff !important;

    cursor: pointer;
    transition: color .15s ease;
}

.air-datepicker-button:hover {
    color: #8ec4ff !important;
}

/* Убираем order/margins */
.air-datepicker-button.-clear-,
.air-datepicker-button.-today-,
.air-datepicker-button.-ok- {
    margin: 0 !important;
    order: unset !important;
}


/* ==========================================================
   МОДАЛКА — 100% стабильность на Android/iOS
========================================================== */

@media (max-width: 1024px) {

    #mobileDateModal {
        position: fixed;
        inset: 0;
        z-index: 99999;

        background: rgba(0,0,0,0.65);

        display: none;
        justify-content: center;
        align-items: center;

        /* Избегаем багов Samsung/Android с backdrop-filter */
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    #mobileDateModal.show {
        display: flex;
        animation: fadeIn .2s ease-out;
    }

    .mobile-datepicker-box {
        padding: 0 !important;
        background: transparent !important;
    }

    #mobileDateModal .air-datepicker {
        width: 360px !important;
        max-width: 360px !important;
        padding: 12px !important;
    }

    .air-datepicker--buttons {
        padding: 18px 24px 16px !important;
    }
}

/* ======================
   Fade animation
====================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}