/**
 * =========================================================
 * YUMBAKER: Cookie notice styles 2026 06 04
 * ---------------------------------------------------------
 * Зачем:
 * - показать cookie-баннер как мягкую нижнюю карточку;
 * - не занимать место в потоке контента;
 * - использовать только фирменные CSS-переменные --yb-*.
 * =========================================================
 */

.yb-cookie-notice {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 99999;
    width: min(720px, calc(100vw - 40px));
    transform: translateX(-50%) translateY(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.yb-cookie-notice.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.yb-cookie-notice.is-hiding {
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
    pointer-events: none;
}

.yb-cookie-notice__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 18px 18px 18px 20px;
    border-radius: 20px;
    background: var(--yb-cream, #FFF7EC);
    color: var(--yb-graphite, #333333);
    box-shadow: var(--yb-shadow, 0 8px 24px rgba(0, 0, 0, 0.12));
    border: 1px solid color-mix(in srgb, var(--yb-accent, #963641) 10%, transparent);
    box-sizing: border-box;
}

.yb-cookie-notice__icon {
    width: 34px;
    height: 34px;
    color: var(--yb-accent, #963641);
    flex: 0 0 auto;
}

.yb-cookie-notice__icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.yb-cookie-notice__text {
    margin: 0;
    color: var(--yb-graphite, #333333);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 400;
}

.yb-cookie-notice__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: 44px;
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    background: var(--yb-accent, #963641);
    color: var(--yb-cream-light, #FFFDF8);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.18s ease, transform 0.18s ease;
}

.yb-cookie-notice__button:hover {
    background: var(--yb-accent-dark, #7A2A33);
    transform: translateY(-1px);
}

.yb-cookie-notice__button:focus {
    outline: 2px solid color-mix(in srgb, var(--yb-accent, #963641) 28%, transparent);
    outline-offset: 2px;
}

/**
 * =========================================================
 * YUMBAKER: Cookie notice mobile layout 2026 06 04
 * ---------------------------------------------------------
 * Зачем:
 * - сделать баннер почти на всю ширину мобильного экрана;
 * - оставить кнопку удобной для нажатия большим пальцем;
 * - не перекрывать критичный контент больше необходимого.
 * =========================================================
 */
@media (max-width: 767px) {
    .yb-cookie-notice {
        left: 12px;
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto;
        transform: translateY(18px);
    }

    .yb-cookie-notice.is-visible {
        transform: translateY(0);
    }

    .yb-cookie-notice.is-hiding {
        transform: translateY(18px);
    }

    .yb-cookie-notice__inner {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "icon text"
            "button button";
        gap: 12px;
        padding: 16px;
        border-radius: 18px;
        background: color-mix(in srgb, var(--yb-cream, #FFF7EC) 92%, transparent);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }

    .yb-cookie-notice__icon {
        grid-area: icon;
        width: 30px;
        height: 30px;
    }

    .yb-cookie-notice__text {
        grid-area: text;
        font-size: 13px;
        line-height: 1.35;
    }

    .yb-cookie-notice__button {
        grid-area: button;
        width: 100%;
        min-height: 46px;
        border-radius: 12px;
    }
}
