/* ============================================
   Cookie Banner v2.0 — ООО «КТП»
   ============================================ */

/* === БАННЕР === */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 900px;
    margin: 0 auto;
    background: #1e293b;
    color: #f1f5f9;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    flex-direction: column;
    gap: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    animation: cookieSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
    display: flex;
}

@keyframes cookieSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cookie-banner__body { width: 100%; }

.cookie-banner__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cookie-banner__icon { font-size: 22px; }

.cookie-banner__title {
    font-size: 16px;
    font-weight: 700;
    color: #f59e0b;
}

.cookie-banner__text {
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0;
}

.cookie-banner__text b { color: #f1f5f9; }

.cookie-banner__text a {
    color: #60a5fa;
    text-decoration: underline;
}
.cookie-banner__text a:hover { color: #93c5fd; }

.cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.cookie-banner__btn {
    padding: 11px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.cookie-banner__btn--accept {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
    flex: 1;
    min-width: 140px;
}
.cookie-banner__btn--accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.4);
}

.cookie-banner__btn--decline {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.4);
    flex: 1;
    min-width: 140px;
}
.cookie-banner__btn--decline:hover {
    background: rgba(148, 163, 184, 0.25);
    color: #fff;
}

.cookie-banner__btn--ghost {
    background: transparent;
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.4);
    flex: 1;
    min-width: 140px;
}
.cookie-banner__btn--ghost:hover {
    background: rgba(96, 165, 250, 0.1);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.6);
}

/* === МОДАЛКА НАСТРОЕК === */
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cookie-modal.show { display: flex; }

.cookie-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.cookie-modal__content {
    position: relative;
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    animation: cookieModalIn 0.3s ease;
}

@keyframes cookieModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.cookie-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.cookie-modal__header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #f1f5f9;
    margin: 0;
}

.cookie-modal__close {
    background: rgba(148, 163, 184, 0.15);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #cbd5e1;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}
.cookie-modal__close:hover {
    background: rgba(239, 68, 68, 0.8);
    color: #fff;
}

.cookie-modal__body {
    padding: 20px 24px;
}

.cookie-modal__intro {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.cookie-modal__row {
    padding: 14px;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: background 0.2s ease;
}
.cookie-modal__row:hover {
    background: rgba(148, 163, 184, 0.12);
}

.cookie-modal__label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.cookie-modal__label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #f59e0b;
    flex-shrink: 0;
    cursor: pointer;
}
.cookie-modal__label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-modal__cat-name {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cookie-modal__required {
    font-size: 10px;
    font-weight: 600;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-modal__cat-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
    margin-top: 4px;
}

.cookie-modal__footer {
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.cookie-modal__footer .cookie-banner__btn {
    width: 100%;
}

/* === ССЫЛКА В ФУТЕРЕ (для повторного открытия) === */
.cookie-settings-link {
    color: #94a3b8;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}
.cookie-settings-link:hover {
    color: #f59e0b;
    text-decoration: underline;
}

/* === МОБИЛЬНЫЙ === */
@media (max-width: 640px) {
    .cookie-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 16px 18px;
        gap: 12px;
    }

    .cookie-banner__actions {
        flex-direction: column;
    }

    .cookie-banner__btn {
        width: 100%;
        padding: 12px 16px;
    }

    .cookie-modal__content {
        max-height: 95vh;
    }
}
/* ============================================
   v2.1 — Ссылка "Настройки cookie" в футере
   + плавающая кнопка (fallback)
   ============================================ */

/* Ссылка в футере */
.cookie-settings-wrap {
    width: 100%;
    text-align: center;
    padding: 12px 0 0 0;
    margin-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.cookie-settings-link {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 13px;
    opacity: 0.7;
    cursor: pointer;
    font-family: inherit;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.cookie-settings-link:hover {
    opacity: 1;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

/* Плавающая кнопка (fallback) */
.cookie-settings-fab {
    position: fixed;
    left: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1e293b;
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
    font-size: 20px;
    cursor: pointer;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.cookie-settings-fab:hover {
    transform: scale(1.08);
    background: #334155;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

/* На мобильных плавающая кнопка меньше */
@media (max-width: 640px) {
    .cookie-settings-fab {
        left: 12px;
        bottom: 12px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}
