/* Плашка льготного периода подписки: «Вы не оплатили подписку. Сервис отключится через N дн.» (templates/grace_banner.html).
   Сверху страницы, над шапкой раздела; остаётся на виду при прокрутке (sticky), но занимает одну строку.
   Тёмная тема - в dark-theme.css. */

.grace-banner {
    position: sticky;
    top: 10px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 20px -4px 8px;
    padding: 10px 12px 10px 14px;
    background: #fff4dc;
    border: 1px solid rgba(232, 154, 0, 0.55);
    border-left: 4px solid #e89a00;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(138, 90, 0, 0.14);
    color: #6b4300;
    font-size: 14px;
    line-height: 1.4;
}

.grace-banner[hidden] { display: none; }

.grace-banner.is-last {
    background: #ffe7c2;
    border-color: #e89a00;
    border-left-color: #d97706;
}

.grace-banner-ico {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffb11b;
    color: #fff;
}

.grace-banner-ico svg { width: 18px; height: 18px; }

.grace-banner-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.grace-banner-text { font-weight: 700; }
.grace-banner-note { font-size: 12.5px; opacity: 0.85; }

.grace-banner-pay {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 18px;
    border-radius: 10px;
    background: #e89a00;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}

.grace-banner-pay:hover { background: #cf8800; color: #fff; }

.grace-banner-close {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
}

.grace-banner-close:hover { opacity: 1; background: rgba(138, 90, 0, 0.12); }

/* Телефон: шторка меню и кнопка-гамбургер лежат поверх страницы, плашка на всю ширину, кнопка под текстом */
@media (max-width: 768px) {
    .grace-banner {
        top: 6px;
        flex-wrap: wrap;
        gap: 8px 10px;
        margin: 8px 10px -2px;
        padding: 10px 10px 10px 12px;
        font-size: 13px;
    }
    .grace-banner-body { flex-basis: calc(100% - 100px); }
    .grace-banner-pay { order: 4; flex: 1 1 100%; height: 38px; }
    .grace-banner-close { margin-left: auto; }
}
