/* ═══════════════════════════════════════════════
   COOKIE BANNER — Squad.Win
   Elegant dark glassmorphism, non-invasive
═══════════════════════════════════════════════ */

.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    width: calc(100% - 48px);
    max-width: 560px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(99, 102, 241, 0.12);
    z-index: 10000;
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Cookie icon */
.cookie-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.cookie-text {
    flex: 1;
    min-width: 0;
}

.cookie-text p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
}

.cookie-text a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 500;
}

.cookie-text a:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.cookie-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.2px;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.btn-accept {
    background: #6366f1;
    color: #fff;
}
.btn-accept:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.btn-reject {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.09);
}
.btn-reject:hover {
    background: rgba(255, 255, 255, 0.11);
    color: rgba(255, 255, 255, 0.8);
}

.btn-settings {
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    padding: 8px 6px;
    border: none;
}
.btn-settings:hover {
    color: rgba(255, 255, 255, 0.75);
}

/* ═══════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════ */

.cookie-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 24px 0;
}

.cookie-modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease both;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    padding: 28px;
    width: calc(100% - 48px);
    max-width: 460px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

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

.modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.modal-content > p {
    margin: 0 0 20px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}

.cookie-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.cookie-option:hover {
    border-color: rgba(99, 102, 241, 0.25);
}

.cookie-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cookie-option h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-option p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.5;
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 23px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 23px;
    transition: background 0.25s;
}

.slider:before {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    left: 3px;
    bottom: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s;
}

input:checked + .slider {
    background: #6366f1;
}

input:checked + .slider:before {
    transform: translateX(19px);
    background: #fff;
}

input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.necessary-badge {
    font-size: 10px;
    font-weight: 600;
    color: #818cf8;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    padding: 1px 6px;
    letter-spacing: 0.3px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-buttons .btn-accept {
    padding: 9px 18px;
    font-size: 13px;
}

.modal-buttons .btn-reject {
    padding: 9px 18px;
    font-size: 13px;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

@media (max-width: 540px) {
    .cookie-banner {
        bottom: 12px;
        width: calc(100% - 24px);
        padding: 14px 16px;
    }

    .cookie-content {
        flex-wrap: wrap;
    }

    .cookie-icon {
        display: none;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: flex-end;
        margin-top: 6px;
    }

    .btn-settings {
        margin-right: auto;
    }
}