/* King Gen - Cookie Consent Styles */
/* Using Tailwind CSS via CDN */

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    max-height: 90vh;
    overflow-y: auto;
}

#cookie-banner.active {
    transform: translateY(0);
}

.cookie-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 768px) {
    .cookie-banner-container {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
}

.cookie-banner-content {
    flex: 1;
    color: #f5f5f7;
}

.cookie-banner-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #ffffff;
}

.cookie-banner-text {
    font-size: 12px;
    line-height: 1.5;
    color: #86868b;
    margin-bottom: 6px;
}

.cookie-banner-link {
    color: #2997ff;
    text-decoration: underline;
    font-size: 12px;
    transition: color 0.2s;
}

.cookie-banner-link:hover {
    color: #0077ed;
}

.cookie-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

@media (min-width: 768px) {
    .cookie-banner-actions {
        flex-direction: row;
        width: auto;
        flex-shrink: 0;
        gap: 8px;
    }
}

.cookie-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
    min-width: 100px;
}

.cookie-btn-primary {
    background: #2997ff;
    color: #ffffff;
}

.cookie-btn-primary:hover {
    background: #0077ed;
}

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

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

.cookie-btn-outline {
    background: transparent;
    color: #f5f5f7;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Cookie Preference Center Modal */
#cookie-preference-center {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#cookie-preference-center.active {
    opacity: 1;
    visibility: visible;
}

.cookie-preference-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.cookie-preference-modal {
    position: relative;
    background: #1d1d1f;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

#cookie-preference-center.active .cookie-preference-modal {
    transform: scale(1);
}

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

.cookie-preference-title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.cookie-preference-close {
    background: none;
    border: none;
    color: #86868b;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.cookie-preference-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.cookie-preference-body {
    padding: 24px;
}

.cookie-preference-intro {
    color: #86868b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.cookie-category {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.02);
}

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

.cookie-category-info {
    flex: 1;
}

.cookie-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.cookie-category-desc {
    font-size: 13px;
    color: #86868b;
    line-height: 1.5;
}

.cookie-category-toggle {
    position: relative;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
    margin-left: 16px;
}

.cookie-category-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-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: 28px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: #ffffff;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-category-toggle input:checked + .cookie-toggle-slider {
    background-color: #2997ff;
}

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

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

.cookie-preference-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Accessibility */
.cookie-btn:focus,
.cookie-preference-close:focus,
.cookie-category-toggle input:focus + .cookie-toggle-slider {
    outline: 2px solid #2997ff;
    outline-offset: 2px;
}

/* Scrollbar styling for modal */
.cookie-preference-modal::-webkit-scrollbar {
    width: 8px;
}

.cookie-preference-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.cookie-preference-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.cookie-preference-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile responsive */
@media (max-width: 767px) {
    .cookie-banner-title {
        font-size: 14px;
    }
    
    .cookie-banner-text {
        font-size: 11px;
    }
    
    .cookie-btn {
        width: 100%;
        min-width: auto;
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .cookie-preference-modal {
        max-height: 95vh;
    }
    
    .cookie-preference-title {
        font-size: 20px;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .cookie-category-toggle {
        margin-left: 0;
        align-self: flex-start;
    }
}
