/* Liquid Glass Cookie Consent System - Dark Theme */

#cookie-consent-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    max-width: 1100px;
    margin: 0 auto;
    z-index: 999990;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2) inset;
    padding: 1.5rem 1.75rem;
    color: #e2e8f0;
    font-family: inherit;
    animation: cookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 280px;
}

.cookie-banner-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.4rem;
}

.cookie-banner-title svg {
    color: #3b82f6;
    flex-shrink: 0;
}

.cookie-banner-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0;
}

.cookie-banner-desc a {
    color: #60a5fa;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.cookie-banner-desc a:hover {
    color: #93c5fd;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    outline: none;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: linear-space, #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.cookie-btn-primary:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.cookie-btn-tertiary {
    background: transparent;
    color: #94a3b8;
    border: 1px solid transparent;
}

.cookie-btn-tertiary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Modal Overlay & Modal Window */
#cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 7, 18, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999995;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: cookieFadeIn 0.25s ease forwards;
}

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

.cookie-modal-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.25) inset;
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cookieZoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cookieZoomIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    border-radius: 6px;
    transition: color 0.15s ease;
}

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

.cookie-modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-lead {
    font-size: 0.92rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.cookie-category-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.1rem;
    margin-bottom: 0.85rem;
    transition: all 0.2s ease;
}

.cookie-category-item:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.14);
}

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

.cookie-category-title {
    font-weight: 600;
    font-size: 1rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category-desc {
    font-size: 0.86rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
}

.cookie-category-cookies {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
    font-family: monospace;
}

/* Modern Switch Toggle */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #cbd5e1;
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cookie-switch input:checked + .cookie-slider {
    background-color: #2563eb;
    border-color: #3b82f6;
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(20px);
    background-color: #ffffff;
}

.cookie-switch input:disabled + .cookie-slider {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #1e3a8a;
    border-color: #2563eb;
}

.cookie-switch input:disabled + .cookie-slider:before {
    background-color: #93c5fd;
}

.cookie-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 16, 30, 0.6);
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Floating re-open trigger badge (bottom left) */
#cookie-settings-trigger {
    position: fixed;
    bottom: 18px;
    left: 18px;
    z-index: 99990;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#cookie-settings-trigger:hover {
    color: #ffffff;
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(59, 130, 246, 0.5);
    transform: scale(1.08);
}

@media (max-width: 768px) {
    #cookie-consent-banner {
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 1.25rem;
    }

    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cookie-banner-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-modal-card {
        max-height: 90vh;
    }

    .cookie-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-modal-footer button {
        width: 100%;
    }
}
