/* ==========================================================================
   ByteAbyss - Cookie Consent System
   ========================================================================== */

   .cookie-banner-wrapper {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    pointer-events: none; /* Let clicks pass through the wrapper */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: calc(100vw - 48px);
}

.cookie-banner-content {
    pointer-events: auto; /* Enable clicks on the actual banner */
    background: linear-gradient(135deg, rgba(7, 9, 14, 0.98), rgba(16, 24, 39, 0.98));
    border: 1px solid rgba(167, 243, 194, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(167, 243, 194, 0.05);
    border-radius: 12px;
    padding: 24px;
    width: 400px;
    max-width: 100%;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}

.cookie-banner-wrapper.cb-show .cookie-banner-content {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.cb-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #ffffff;
    font-size: 1.15rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cb-text {
    font-family: 'Inter', sans-serif;
    color: #94a3b8; /* text-secondary equivalent */
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.cb-text a {
    color: var(--primary-color, #a7f3c2);
    text-decoration: none;
    font-weight: 500;
}

.cb-text a:hover {
    text-decoration: underline;
}

.cb-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cb-actions-row {
    display: flex;
    gap: 10px;
}

/* Buttons */
.cb-btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: all 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.cb-btn:focus-visible {
    outline: 2px solid var(--primary-color, #a7f3c2);
    outline-offset: 2px;
}

.cb-btn-primary {
    background-color: var(--primary-color, #a7f3c2);
    color: #07090e;
    flex: 1;
}

.cb-btn-primary:hover {
    background-color: #8be8ab;
    box-shadow: 0 0 15px rgba(167, 243, 194, 0.3);
}

.cb-btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
}

.cb-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.cb-btn-tertiary {
    background-color: transparent;
    color: #94a3b8;
    padding: 6px;
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cb-btn-tertiary:hover {
    color: #ffffff;
}

/* Modal configuration */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.cookie-modal-overlay.cb-show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 500px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-modal-overlay.cb-show .cookie-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.cookie-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #ffffff;
    font-size: 1.25rem;
    margin: 0;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.cookie-modal-close:hover {
    color: #ffffff;
}

.cookie-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Scrollbar styling for modal body */
.cookie-modal-body::-webkit-scrollbar {
    width: 6px;
}
.cookie-modal-body::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}
.cookie-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}
.cookie-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

.cookie-category {
    margin-bottom: 24px;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

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

.cookie-category-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #ffffff;
    font-size: 1.05rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category-desc {
    font-family: 'Inter', sans-serif;
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Toggle Switch */
.cb-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cb-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cb-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .2s;
    border-radius: 34px;
}

.cb-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .2s;
    border-radius: 50%;
}

input:checked + .cb-slider {
    background-color: var(--primary-color, #a7f3c2);
}

input:focus-visible + .cb-slider {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

input:checked + .cb-slider:before {
    transform: translateX(20px);
    background-color: #07090e;
}

/* Always On Badge */
.cb-always-on {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color, #a7f3c2);
    background-color: rgba(167, 243, 194, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-wrapper {
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100vw;
    }
    
    .cookie-banner-content {
        width: 100%;
        border-radius: 16px 16px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 20px;
    }

    .cb-actions-row {
        flex-direction: column;
    }
    
    .cookie-modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .cookie-modal-body {
        flex: 1;
        max-height: none;
    }

    .cookie-modal-footer {
        border-radius: 0;
        flex-direction: column;
    }
    
    .cookie-modal-footer .cb-btn {
        width: 100%;
    }
}
