/**
 * Фэншуй Активации — модальное окно дня и мини-модалка описания
 * assets/css/modal-day.css
 *
 * @package FengshuiActivations
 */

/* ─── МОДАЛЬНОЕ ОКНО ─────────────────────────────────────────────────────── */
.fsa-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(94,82,83,0.60);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fsa-modal {
    background: #FAF6F0;
    border-radius: 16px;
    width: 100%;
    max-width: 780px;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(94,82,83,0.28);
    animation: fsa-modal-in 0.2s ease;
}

@keyframes fsa-modal-in {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ─── Шапка: самый насыщенный фон — якорь всей иерархии ─────────────────── */
.fsa-modal__head {
    padding: 18px 22px 14px;
    background: #F5EDD8;
    border-bottom: 1px solid #E8DDD5;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-shrink: 0;
}

.fsa-modal__date { font-size: 20px; font-weight: 700; color: #2C1F1A; }

/* ─── Блок города ────────────────────────────────────────────────────────── */
.fsa-modal__city-block {
    margin-top: 6px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.fsa-modal__city-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--fsa-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.fsa-modal__city {
    font-size: 13px;
    font-weight: 600;
    color: #C9A96E;
}

/* ─── Ограничение ────────────────────────────────────────────────────────── */
.fsa-modal__restriction {
    margin: 0;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    flex-shrink: 0;
    border-left: 4px solid transparent;
    border-bottom: 1px solid #d4c8c2;
}

.fsa-modal__restriction--warn {
    background: #ffffff;
    border-left: 4px solid #e05555;
    border-top: 1px solid #f5c0c0;
    border-bottom: 1px solid #f5c0c0;
    color: #f53924;
    font-weight: 600;
}

.fsa-modal__restriction--info {
    background: #ffffff;
    border-left-color: #C9A96E;
    border-top: 1px solid #d4c8c2;
    border-bottom: 1px solid #d4c8c2;
    color: #6B5550;
}

/* ─── Строка истинного времени под городом (на странице) ────────────────── */
.fsa-solar-row {
    margin-top: 10px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.fsa-solar-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #2C1F1A;
    user-select: none;
    white-space: nowrap;
}

.fsa-solar-label input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: #C9A96E;
    cursor: pointer;
    flex-shrink: 0;
}

.fsa-solar-explain {
    font-size: 12px;
    font-weight: 500;
    color: var(--fsa-text-light);
    font-style: italic;
    line-height: 1.4;
}

/* ─── Solar toggle в модалке — убран ────────────────────────────────────── */
.fsa-modal__solar-toggle { display: none; }

/* ─── Подсказка — убрана ─────────────────────────────────────────────────── */
.fsa-modal__tip { display: none; }

/* ─── Тело модалки ───────────────────────────────────────────────────────── */
.fsa-modal__body {
    flex: 1;
    overflow-y: auto;
    background: #FFFFFF;
}

.fsa-modal__body::-webkit-scrollbar { width: 4px; }
.fsa-modal__body::-webkit-scrollbar-thumb { background: #E8D5B0; border-radius: 4px; }

/* ─── МИНИ-МОДАЛКА ОПИСАНИЯ ──────────────────────────────────────────────── */
.fsa-desc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(94,82,83,0.55);
    z-index: 10100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fsa-desc-modal {
    background: #FFFFFF;
    border-radius: 14px;
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(94,82,83,0.28);
    animation: fsa-desc-in 0.18s ease;
}

@keyframes fsa-desc-in {
    from { opacity: 0; transform: scale(0.94) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.fsa-desc-modal__head {
    padding: 16px 20px 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #E8DDD5;
    background: #F5EDD8;
    flex-shrink: 0;
}

.fsa-desc-modal__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    flex: 1;
}

.fsa-desc-modal__close {
    background: #E8DDD5;
    border: none;
    border-radius: 50%;
    width: 28px; height: 28px;
    font-size: 17px;
    color: #C9A96E;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.13s;
    line-height: 1;
}

.fsa-desc-modal__close:hover { background: #E8D5B0; }

.fsa-desc-modal__body {
    padding: 16px 20px 20px;
    overflow-y: auto;
    flex: 1;
}

.fsa-desc-modal__body::-webkit-scrollbar { width: 4px; }
.fsa-desc-modal__body::-webkit-scrollbar-thumb { background: #E8D5B0; border-radius: 4px; }

.fsa-desc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fsa-desc-list li {
    position: relative;
    padding-left: 18px;
    font-size: 14px;
    font-weight: 400;
    color: #2C1F1A;
    line-height: 1.4;
}

.fsa-desc-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 9px;
    color: #C9A96E;
    opacity: 0.7;
}

/* ─── Кнопки закрытия ────────────────────────────────────────────────────── */
.fsa-modal__close {
    background: #E8DDD5;
    border: none;
    border-radius: 50%;
    width: 30px; height: 30px;
    font-size: 18px;
    color: #C9A96E;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.13s;
}

.fsa-modal__close:hover { background: #E8D5B0; }


/* ─── Адаптив ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .fsa-modal, .fsa-desc-modal {
        max-height: 96vh;
        border-radius: 12px 12px 0 0;
        max-width: 100%;
    }

    .fsa-modal-overlay,
    .fsa-desc-overlay   { align-items: flex-end; padding: 0; }

    .fsa-modal__head { padding: 8px 5px 10px; }
}