/* cal-ui.css — попап, CTA-баннер, «обновлено», футер, адаптивность */

/* ── Попап ── */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(4px);
    transition: opacity 0.2s;
}
.popup-overlay.popup-visible { opacity: 1; pointer-events: auto; }

.popup-box {
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: var(--r-lg);
    padding: 32px 28px 28px;
    max-width: 360px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    transform: translateY(8px);
    transition: transform 0.2s;
}
.popup-overlay.popup-visible .popup-box { transform: translateY(0); }

.popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text3);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
}
.popup-close:hover { color: var(--text); }

.popup-icon { font-size: 32px; margin-bottom: 14px; }
.popup-text { font-size: 14px; color: var(--text2); line-height: 1.6; margin-bottom: 20px; }

.popup-cta {
    display: block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--r);
    transition: background 0.15s, transform 0.1s;
}
.popup-cta:hover { background: var(--accent2); transform: translateY(-1px); }

/* ── CTA-баннер ── */
.cta-banner {
    margin-top: 36px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #1a0d0f 0%, #1a1414 100%);
    border: 1px solid #3d1a1e;
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s, transform 0.4s;
}
.cta-banner.cta-visible { opacity: 1; transform: translateY(0); }
.cta-banner p { font-size: 15px; font-weight: 500; }
.cta-banner a {
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: var(--r);
    white-space: nowrap;
    transition: background 0.15s, transform 0.1s;
}
.cta-banner a:hover { background: var(--accent2); transform: translateY(-1px); }

/* ── Дата обновления ── */
.updated {
    margin-top: 18px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text3);
    text-align: right;
}

/* ── Футер ── */
.cal-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text3);
    font-size: 13px;
}
.cal-footer ul { list-style: none; margin-bottom: 12px; }
.cal-footer .link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text2);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s;
}
.cal-footer .link:hover { color: var(--accent); }
.cal-footer .icon { font-size: 16px; }
.cal-footer p { margin-top: 8px; }
.cal-footer p a { color: var(--text3); text-decoration: none; transition: color 0.15s; }
.cal-footer p a:hover { color: var(--text2); }

/* ── Адаптив 768px ── */
@media (max-width: 768px) {
    .calendar-wrap { padding: var(--sticky-h, 280px) 14px 48px; }

    .sticky-inner { padding: 10px 14px 0; }

    /* Логотип чуть меньше */
    .cal-logo { height: 50px; }
    .calendar-header h1 { font-size: 10px; margin-top: -15px; }

    /* 4 дропдауна в одну строку — компактно */
    .filters-bar {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }
    .flt-trigger, .lang-select select {
        height: 30px;
        font-size: 11px;
        padding: 0 7px;
    }

    /* Дропдауны открываются вниз, первые два — вправо, вторые — влево */
    #utc-dropdown    { left: 0; right: auto; }
    #impact-dropdown { left: auto; right: 0; }
    #currency-dropdown { left: auto; right: 0; min-width: 160px; }

    /* Вкладки дней */
    .day-tab    { min-width: 44px; padding: 6px 8px; }
    .week-arrow { padding: 0 8px; font-size: 11px; }

    /* Скрываем «Страна» */
    .col-country, th[data-key="country"] { display: none; }

    /* CTA баннер */
    .cta-banner { flex-direction: column; }
    .cta-banner a { width: 100%; text-align: center; }
}

/* ── Адаптив 480px ── */
@media (max-width: 480px) {
    .popup-box { padding: 24px 20px 20px; }
    .filters-bar { gap: 3px; }
    .flt-trigger, .lang-select select { height: 28px; font-size: 12px; padding: 0 5px; }
}

/* ── Адаптив 360px ── */
@media (max-width: 360px) {
    .col-currency, th[data-key="currency"] { display: none; }
}
