/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 800px;
    width: 90%;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cookie-banner.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Backdrop */
.cookie-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
}

.cookie-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.cookie-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 32px;
    color: white;
}

.cookie-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.cookie-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-icon {
    width: 24px;
    height: 24px;
    fill: #3B82F6;
}

.cookie-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 14px;
}

.cookie-description a {
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Cookie Categories */
.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-title {
    font-weight: 500;
    color: #fff;
    font-size: 16px;
}

.category-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.category-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.5;
    display: none;
}

.cookie-category.expanded .category-description {
    display: block;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 24px;
}

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

input:checked + .toggle-slider {
    background-color: #3B82F6;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

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

/* Buttons */
.cookie-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563eb 100%);
    color: white;
}

.cookie-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.cookie-btn-text {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
}

.cookie-btn-text:hover {
    color: white;
}

/* Expand/Collapse Icon */
.expand-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}

.cookie-category.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Settings View */
.cookie-settings {
    display: none;
}

.cookie-banner.settings-view .cookie-main {
    display: none;
}

.cookie-banner.settings-view .cookie-settings {
    display: block;
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-content {
        padding: 20px 16px;
    }

    .cookie-title {
        font-size: 18px;
    }

    .cookie-description {
        font-size: 13px;
    }

    .cookie-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
        justify-content: center;
        font-size: 13px;
        padding: 10px 16px;
    }

    .cookie-btn-text {
        flex: 0 0 auto;
    }

    .category-title {
        font-size: 15px;
    }

    .category-count {
        font-size: 13px;
    }

    .cookie-banner {
        width: 95%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .cookie-content {
        padding: 16px 12px;
    }

    .cookie-title {
        font-size: 16px;
    }

    .cookie-description {
        font-size: 12px;
    }

    .cookie-btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    .category-title {
        font-size: 14px;
    }

    .cookie-banner {
        width: 98%;
        border-radius: 12px;
    }
}