/* Cookie Consent Banner & Modal Styles */

/* ── Banner ─────────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #212121;
    color: #f5f5f5;
    padding: 16px 24px;
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.cookie-banner--hidden {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
}

.cookie-banner__text {
    flex: 1;
    min-width: 200px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.cookie-banner__text a {
    color: #78D9A5;
    text-decoration: underline;
}

.cookie-banner__text a:hover {
    color: #C8A43B;
}

.cookie-banner__buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* ── Shared button base ─────────────────────────────────── */
.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.cookie-btn--primary {
    background: #78D9A5;
    color: #1a1a1a;
    border-color: #78D9A5;
}

.cookie-btn--primary:hover {
    background: #5ec98f;
    border-color: #5ec98f;
}

.cookie-btn--outline {
    background: transparent;
    color: #C8A43B;
    border-color: #C8A43B;
}

.cookie-btn--outline:hover {
    background: rgba(200,164,59,0.12);
}

/* Secondary (Reject) — same visual weight as primary, neutral fill */
.cookie-btn--secondary {
    background: #f0f0f0;
    color: #1a1a1a;
    border-color: #d0d0d0;
}

.cookie-btn--secondary:hover {
    background: #e0e0e0;
    border-color: #bbb;
}

.cookie-btn--ghost {
    background: transparent;
    color: #aaa;
    border-color: #555;
    font-size: 0.8rem;
    padding: 8px 14px;
}

.cookie-btn--ghost:hover {
    color: #f5f5f5;
    border-color: #888;
}

/* ── Overlay ────────────────────────────────────────────── */
.cookie-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cookie-overlay--visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Modal ──────────────────────────────────────────────── */
.cookie-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #fff;
    border-radius: 20px;
    z-index: 9999;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    padding: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-modal--visible {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cookie-modal__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.cookie-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease;
}

.cookie-modal__close:hover {
    color: #1a1a1a;
    background: #f0f0f0;
}

.cookie-modal__description {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ── Category rows ──────────────────────────────────────── */
.cookie-category {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.cookie-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cookie-category__info {
    flex: 1;
}

.cookie-category__name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.cookie-category__desc {
    font-size: 0.8rem;
    color: #777;
    line-height: 1.5;
}

/* ── Toggle switch ──────────────────────────────────────── */
.cookie-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-toggle__track {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.25s ease;
}

.cookie-toggle input:checked + .cookie-toggle__track {
    background: #78D9A5;
}

.cookie-toggle input:disabled + .cookie-toggle__track {
    background: #78D9A5;
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.cookie-toggle input:checked + .cookie-toggle__track::after {
    transform: translateX(22px);
}

/* ── Modal footer buttons ───────────────────────────────── */
.cookie-modal__footer {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ── FAB (settings floating button) ────────────────────── */
.cookie-settings-fab {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #212121;
    color: #78D9A5;
    border: 2px solid #78D9A5;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 9996;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    transition: background 0.2s ease, transform 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.cookie-settings-fab--visible {
    opacity: 1;
    pointer-events: all;
}

.cookie-settings-fab:hover {
    background: #333;
    transform: scale(1.08);
}

/* ── Footer link button ─────────────────────────────────── */
.cookie-footer-link {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
    text-align: left;
    transition: color 0.2s ease;
}

.cookie-footer-link:hover {
    color: #78D9A5;
    text-decoration: underline;
}

/* ── Scrollbar in modal ─────────────────────────────────── */
.cookie-modal::-webkit-scrollbar { width: 6px; }
.cookie-modal::-webkit-scrollbar-track { background: #f5f5f5; border-radius: 3px; }
.cookie-modal::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 16px;
    }
    .cookie-banner__buttons {
        width: 100%;
    }
    .cookie-btn {
        flex: 1;
        text-align: center;
    }
    .cookie-modal {
        padding: 20px 16px;
        border-radius: 16px 16px 0 0;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        transform: translateY(20px);
        max-height: 85vh;
    }
    .cookie-modal--visible {
        transform: translateY(0);
    }
    .cookie-settings-fab {
        bottom: 16px;
        left: 16px;
    }
}
