/* ==========================================================================
   HAYAT İŞLERİ - 6698 SAYILI KVKK & GDPR ÇEREZ YÖNETİM SİSTEMİ
   Google Sans Tipografisi | Sağ Alt Konum | Tam Ekran Etkileşim & Kaydırma Kilidi
   ========================================================================== */

/* 0. Font ve Tipografi Eşitleme (Anasayfa ile %100 Aynı) */
.hayat-cookie-banner-wrap,
.hayat-cookie-banner-wrap *,
.hayat-cookie-modal,
.hayat-cookie-modal * {
    font-family: 'Google Sans Text', 'Google Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 1. Tam Sayfa Etkileşim & Kaydırma Engelleyici Perde */
.hayat-cookie-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1058;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.hayat-cookie-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Arkadaki sayfa linklerine veya butonlarına tıklanmasını tamamen engeller */
}

/* Çerez kabul edilene kadar sayfa kaydırmasını kilitle */
html.hayat-cookie-locked,
body.hayat-cookie-locked {
    overflow: hidden !important;
    height: 100% !important;
    touch-action: none !important;
    -ms-touch-action: none !important;
}

/* 2. Sağ Alt Çerez Bildirim Kartı (Ultra Modern Glassmorphism) */
.hayat-cookie-banner-wrap {
    position: fixed;
    bottom: 28px;
    right: 28px;
    max-width: 440px;
    width: calc(100% - 36px);
    z-index: 1065;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.38s ease;
    opacity: 0;
    transform: translateY(35px) scale(0.97);
    pointer-events: none;
}

.hayat-cookie-banner-wrap.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hayat-cookie-banner {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(11, 87, 208, 0.16);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16), 0 4px 16px rgba(0, 0, 0, 0.04);
    padding: 1.4rem 1.4rem 1.25rem 1.4rem;
    color: #0f172a;
}

.hayat-cookie-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.hayat-cookie-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0b57d0 0%, #1a73e8 50%, #38bdf8 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(11, 87, 208, 0.3);
}

.hayat-cookie-title {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.3px;
}

.hayat-cookie-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(11, 87, 208, 0.08);
    color: #0b57d0;
    border: 1px solid rgba(11, 87, 208, 0.18);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.hayat-cookie-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 1.15rem;
}

.hayat-cookie-text strong {
    color: #0f172a;
    font-weight: 600;
}

.hayat-cookie-text a {
    color: #0b57d0;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.hayat-cookie-text a:hover {
    color: #0842a0;
}

.hayat-cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.hayat-cookie-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.hayat-cookie-btn {
    border: none;
    border-radius: 9999px;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    user-select: none;
}

.hayat-cookie-btn-primary {
    background: linear-gradient(135deg, #1a73e8 0%, #0b57d0 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(11, 87, 208, 0.28);
}

.hayat-cookie-btn-primary:hover {
    background: linear-gradient(135deg, #0b57d0 0%, #0842a0 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(11, 87, 208, 0.38);
}

.hayat-cookie-btn-secondary {
    background: #f1f5f9;
    color: #334155 !important;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.hayat-cookie-btn-secondary:hover {
    background: rgba(11, 87, 208, 0.09);
    color: #0b57d0 !important;
    border-color: rgba(11, 87, 208, 0.2);
    transform: translateY(-1px);
}

.hayat-cookie-btn-outline {
    background: transparent;
    color: #64748b !important;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.hayat-cookie-btn-outline:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.22);
}

/* 3. Sol Alt Çerez Rozet Butonu (Kullanıcı Talebiyle Tamamen Kaldırıldı) */
.hayat-cookie-floating-trigger {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 4. Çerez Tercihleri Yönetim Modalı (KVKK Detaylı Rıza Merkezi) */
.hayat-cookie-modal {
    z-index: 1070 !important;
}

.hayat-cookie-modal .modal-content {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(11, 87, 208, 0.16);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.hayat-cookie-modal .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1.25rem 1.5rem;
}

.hayat-cookie-modal .modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1rem 1.5rem;
    background: rgba(248, 250, 252, 0.6);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.hayat-cookie-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.1rem;
    margin-bottom: 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hayat-cookie-card:hover {
    border-color: rgba(11, 87, 208, 0.35);
    box-shadow: 0 4px 14px rgba(11, 87, 208, 0.06);
}

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

.hayat-cookie-card-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.hayat-cookie-card-desc {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #6b7280;
    margin: 0;
}

.hayat-cookie-switch-label {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    margin: 0;
    flex-shrink: 0;
}

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

.hayat-cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.25s;
    border-radius: 24px;
}

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

input:checked + .hayat-cookie-slider {
    background-color: #0b57d0;
}

input:focus + .hayat-cookie-slider {
    box-shadow: 0 0 1px #0b57d0;
}

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

input:disabled + .hayat-cookie-slider {
    background-color: #0b57d0;
    opacity: 0.75;
    cursor: not-allowed;
}

/* 5. Koyu Mod (Dark Theme) Desteği */
html[data-theme="dark"] .hayat-cookie-backdrop {
    background: rgba(0, 0, 0, 0.65);
}

html[data-theme="dark"] .hayat-cookie-banner {
    background: rgba(15, 23, 42, 0.94);
    border-color: rgba(138, 180, 248, 0.25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(11, 87, 208, 0.15);
    color: #f8fafc;
}

html[data-theme="dark"] .hayat-cookie-title {
    color: #ffffff;
}

html[data-theme="dark"] .hayat-cookie-badge {
    background: rgba(138, 180, 248, 0.15);
    color: #8ab4f8;
    border-color: rgba(138, 180, 248, 0.3);
}

html[data-theme="dark"] .hayat-cookie-text {
    color: #94a3b8;
}

html[data-theme="dark"] .hayat-cookie-text strong {
    color: #e2e8f0;
}

html[data-theme="dark"] .hayat-cookie-text a {
    color: #8ab4f8;
}

html[data-theme="dark"] .hayat-cookie-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff !important;
}

html[data-theme="dark"] .hayat-cookie-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

html[data-theme="dark"] .hayat-cookie-btn-secondary {
    background: #1e293b;
    color: #cbd5e1 !important;
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .hayat-cookie-btn-secondary:hover {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa !important;
    border-color: rgba(96, 165, 250, 0.3);
}

html[data-theme="dark"] .hayat-cookie-btn-outline {
    color: #94a3b8 !important;
    border-color: rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .hayat-cookie-btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.25);
}

html[data-theme="dark"] .hayat-cookie-modal .modal-content {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(138, 180, 248, 0.28);
    color: #f8fafc;
}

html[data-theme="dark"] .hayat-cookie-modal .modal-header,
html[data-theme="dark"] .hayat-cookie-modal .modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .hayat-cookie-modal .modal-footer {
    background: rgba(22, 30, 49, 0.7);
}

html[data-theme="dark"] .hayat-cookie-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .hayat-cookie-card:hover {
    border-color: rgba(138, 180, 248, 0.4);
}

html[data-theme="dark"] .hayat-cookie-card-title {
    color: #f1f5f9;
}

html[data-theme="dark"] .hayat-cookie-card-desc {
    color: #94a3b8;
}

@media (max-width: 576px) {
    .hayat-cookie-banner-wrap {
        bottom: 20px;
        right: 14px;
        left: 14px;
        width: auto;
    }
    .hayat-cookie-btn-group {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   6. ÇEREZ POLİTİKASI SAYFASINA ÖZEL İSTİSNA (Perde ve kilit yok, sayfa serbest)
   "sadece çerez politikalarımız sayfası görünebilir çerezleri kabul etmese de görünsün"
   ========================================================================== */
body.hayat-cookie-policy-page,
html.hayat-cookie-policy-page {
    overflow: auto !important;
    height: auto !important;
    touch-action: auto !important;
}

body.hayat-cookie-policy-page .hayat-cookie-backdrop {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.hayat-cookie-policy-page {
    padding-bottom: 90px !important;
}

/* Çerez kutusu sallanma (shake) animasyonu */
@keyframes hayatCookieShake {
    0%, 100% { transform: translateY(0) scale(1); }
    20%, 60% { transform: translateY(0) translateX(-8px) scale(1.02); }
    40%, 80% { transform: translateY(0) translateX(8px) scale(1.02); }
}

.hayat-cookie-shake {
    animation: hayatCookieShake 0.45s ease-in-out !important;
}

/* Çerez kabul edilmeden siteye girilmeye çalışıldığında çıkan uyarı balonu */
.hayat-cookie-alert-bubble {
    position: absolute;
    bottom: calc(100% + 14px);
    right: 0;
    width: 100%;
    background: #0f172a;
    color: #ffffff;
    padding: 0.85rem 1.1rem;
    border-radius: 18px;
    font-size: 0.83rem;
    font-weight: 600;
    line-height: 1.45;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    pointer-events: none;
    transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1066;
}

.hayat-cookie-alert-bubble.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hayat-cookie-alert-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 36px;
    width: 12px;
    height: 12px;
    background: #0f172a;
    transform: rotate(45deg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.hayat-cookie-alert-bubble .bubble-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

html[data-theme="dark"] .hayat-cookie-alert-bubble {
    background: #1e293b;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .hayat-cookie-alert-bubble::after {
    background: #1e293b;
}

/* Çerez Politikası Sayfasındaki "Tercihleri Düzenle" Butonu (Zarif Buz Mavisi, Şeffaf ve Kompakt) */
.btn-cerez-ice {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 999px;
    background: rgba(224, 242, 254, 0.55);
    color: #0284c7 !important;
    border: 1px solid rgba(56, 189, 248, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(56, 189, 248, 0.08);
}

.btn-cerez-ice:hover {
    background: rgba(186, 230, 253, 0.85);
    color: #0369a1 !important;
    border-color: rgba(2, 132, 199, 0.45);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.22);
}

html[data-theme="dark"] .btn-cerez-ice {
    background: rgba(14, 165, 233, 0.14);
    color: #7dd3fc !important;
    border-color: rgba(56, 189, 248, 0.28);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .btn-cerez-ice:hover {
    background: rgba(14, 165, 233, 0.26);
    color: #bae6fd !important;
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
