/**
 * KVKK Çerez Onay Popup + Çerez Tercihleri Paneli
 * Performans için style.css'den ayrı dosyada.
 */

/* ========== KVKK Çerez Onay Popup ========== */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    background: linear-gradient(180deg, rgba(11,11,15,0.98) 0%, rgba(8,8,12,0.99) 100%);
    border-top: 1px solid rgba(var(--brand-rgb),0.25);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
    padding: 16px 24px 20px;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.cookie-consent-banner.cookie-consent-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.cookie-consent-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    justify-content: space-between;
}
.cookie-consent-text {
    flex: 1 1 280px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.88);
}
.cookie-consent-text .cookie-link {
    color: rgba(var(--brand-rgb),0.95);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-consent-text .cookie-link:hover {
    color: var(--brand);
}
.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}
.cookie-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    cursor: pointer;
    border: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.cookie-btn-accept {
    background: rgba(var(--brand-rgb),0.9);
    color: #fff;
}
.cookie-btn-accept:hover {
    background: var(--brand);
    box-shadow: 0 4px 12px rgba(var(--brand-rgb),0.4);
}
.cookie-btn-reject {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.15);
}
.cookie-btn-reject:hover {
    background: rgba(255,255,255,0.12);
}
.cookie-btn-preferences {
    background: transparent;
    color: rgba(var(--brand-rgb),0.95);
    border: 1px solid rgba(var(--brand-rgb),0.5);
}
.cookie-btn-preferences:hover {
    background: rgba(var(--brand-rgb),0.12);
}

/* Çerez Tercihleri Paneli */
.cookie-preferences-panel {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cookie-preferences-panel.cookie-preferences-visible {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}
.cookie-preferences-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cookie-preferences-panel.cookie-preferences-visible .cookie-preferences-backdrop {
    opacity: 1;
}
.cookie-preferences-content {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #0f0f12 0%, #0a0a0d 100%);
    border: 1px solid rgba(var(--brand-rgb),0.2);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 48px rgba(0,0,0,0.5);
    padding: 20px 24px 24px;
    transform: translateY(100%);
    transition: transform 0.35s ease;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.cookie-preferences-panel.cookie-preferences-visible .cookie-preferences-content {
    transform: translateY(0);
}
.cookie-preferences-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.cookie-preferences-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}
.cookie-preferences-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    border-radius: 10px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.cookie-preferences-close:hover {
    background: rgba(255,255,255,0.14);
}
.cookie-preferences-desc {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.75);
    margin: 0 0 20px;
}
.cookie-preferences-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}
.cookie-pref-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
}
.cookie-pref-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cookie-pref-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}
.cookie-pref-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    line-height: 1.4;
}
.cookie-toggle {
    flex-shrink: 0;
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 24px;
    transition: background 0.25s;
}
.cookie-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
}
.cookie-toggle input:checked + .cookie-toggle-slider {
    background: rgba(var(--brand-rgb),0.7);
}
.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
}
.cookie-toggle input:disabled + .cookie-toggle-slider {
    cursor: not-allowed;
    opacity: 0.8;
}
.cookie-preferences-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}
.cookie-preferences-footer .cookie-link {
    color: rgba(var(--brand-rgb),0.95);
    text-decoration: underline;
    font-size: 13px;
}
.cookie-preferences-footer .cookie-link:hover {
    color: var(--brand);
}
.cookie-preferences-footer .cookie-btn {
    margin-left: auto;
}
@media (max-width: 600px) {
    .cookie-consent-inner { flex-direction: column; align-items: stretch; }
    .cookie-consent-actions { justify-content: stretch; }
    .cookie-consent-actions .cookie-btn { flex: 1; }
}
