/**
 * Fuzlio Games - Cookie Consent Styles
 * GDPR Uyumlu Çerez Yönetimi Stilleri
 */

/* Çerez Onay Banner'ı */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    border-top: 2px solid var(--primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 1;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-consent-text h3 {
    font-family: 'Fredoka', sans-serif;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.cookie-consent-text p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    font-size: 0.95rem;
}

.cookie-consent-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 120px;
}

.cookie-btn-accept {
    background: var(--primary);
    color: white;
}

.cookie-btn-accept:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.cookie-btn-manage {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.cookie-btn-manage:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.cookie-btn-reject {
    background: var(--danger);
    color: white;
}

.cookie-btn-reject:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Çerez Tercihleri Modal'ı */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

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

.cookie-modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cookie-modal-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.cookie-modal-header h3 {
    font-family: 'Fredoka', sans-serif;
    color: var(--primary);
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.cookie-modal-body {
    padding: 0 1.5rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cookie-category h4 {
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}

.cookie-category p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    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: var(--border);
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-switch input:checked + .cookie-slider {
    background-color: var(--primary);
}

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

.cookie-switch input:disabled + .cookie-slider {
    background-color: var(--success);
    cursor: not-allowed;
}

.cookie-switch input:disabled + .cookie-slider:before {
    background-color: white;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 1rem;
    }
    
    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        max-width: 150px;
    }
    
    .cookie-preferences-modal {
        padding: 1rem;
    }
    
    .cookie-modal-content {
        max-height: 90vh;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .cookie-consent-content {
        padding: 0.75rem;
    }
    
    .cookie-consent-text h3 {
        font-size: 1.1rem;
    }
    
    .cookie-consent-text p {
        font-size: 0.9rem;
    }
    
    .cookie-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        min-width: 100px;
    }
    
    .cookie-preferences-modal {
        padding: 0.5rem;
    }
    
    .cookie-modal-header {
        padding: 1rem 1rem 0;
    }
    
    .cookie-modal-body {
        padding: 0 1rem;
    }
    
    .cookie-modal-footer {
        padding: 1rem;
    }
    
    .cookie-category {
        padding: 0.75rem;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Erişilebilirlik İyileştirmeleri */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-btn,
    .cookie-slider,
    .cookie-modal-content {
        transition: none;
    }
    
    @keyframes modalSlideIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* Yüksek Kontrast Modu */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top-width: 3px;
    }
    
    .cookie-btn {
        border: 2px solid currentColor;
    }
    
    .cookie-modal-content {
        border-width: 2px;
    }
}

/* Dark Mode Uyumluluğu */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    }
}

/* Focus Stilleri */
.cookie-btn:focus,
.cookie-switch input:focus + .cookie-slider,
.cookie-modal-close:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Animasyonlar */
.cookie-consent-banner {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Çerez Tercihleri Link Stilleri */
#cookie-preferences-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

#cookie-preferences-link:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}