/* ============================================================
   SOFUOĞLU - Çerez Onay Sistemi (KVKK/GDPR Uyumlu)
   ============================================================ */

/* ------------------------------ */
/* 1. Çerez Banner (Alt Bildirim) */
/* ------------------------------ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100000;
    background: #fff;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Roboto', sans-serif;
    will-change: transform;
}

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

.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1 1 400px;
    font-size: 13px;
    line-height: 1.6;
    color: #4a4a4a;
}

.cookie-banner-text a {
    color: #c80000;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-banner-text a:hover {
    color: #a00000;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.cookie-btn-accept {
    background: #c80000;
    color: #fff;
    border-color: #c80000;
}

.cookie-btn-accept:hover {
    background: #a00000;
    border-color: #a00000;
}

.cookie-btn-reject {
    background: #fff;
    color: #4a4a4a;
    border-color: #d1d1d1;
}

.cookie-btn-reject:hover {
    background: #f5f5f5;
    border-color: #b0b0b0;
}

.cookie-btn-settings {
    background: #fff;
    color: #c80000;
    border-color: #c80000;
}

.cookie-btn-settings:hover {
    background: #c80000;
    color: #fff;
}

/* ------------------------------ */
/* 2. Çerez Tercih Paneli (Modal) */
/* ------------------------------ */
.cookie-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-panel-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.cookie-panel {
    background: #fff;
    border-radius: 12px;
    max-width: 620px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: cookieSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cookieSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cookie-panel-header {
    padding: 24px 28px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-panel-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-panel-title .cookie-icon-shield {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.cookie-panel-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cookie-panel-close:hover {
    background: #e0e0e0;
    color: #333;
}

.cookie-panel-subtitle {
    padding: 8px 28px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.cookie-panel-subtitle a {
    color: #c80000;
    text-decoration: underline;
}

.cookie-panel-body {
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Cookie Category Card */
.cookie-category {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.cookie-category:hover {
    border-color: #ccc;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    gap: 12px;
}

.cookie-category-info {
    flex: 1;
    min-width: 0;
}

.cookie-category-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cookie-category-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cookie-category-badge.always-on {
    background: #e8f5e9;
    color: #2e7d32;
}

.cookie-category-body {
    padding: 0 16px 14px;
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    display: none;
}

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

.cookie-category-arrow {
    transition: transform 0.25s ease;
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}

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

/* Custom Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #c80000;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-toggle input:checked:disabled + .cookie-toggle-slider {
    background: #a00000;
}

.cookie-toggle.disabled-label {
    cursor: not-allowed;
}

/* Panel Footer */
.cookie-panel-footer {
    padding: 0 28px 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

/* ------------------------------ */
/* 3. Yüzen Ayar Butonu           */
/* ------------------------------ */
.cookie-settings-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-size: 18px;
    color: #666;
    opacity: 0.7;
}

.cookie-settings-float:hover {
    opacity: 1;
    border-color: #c80000;
    color: #c80000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: scale(1.08);
}

/* Make room for WhatsApp button on right */
@media screen and (max-width: 767px) {
    .cookie-settings-float {
        bottom: 85px;
        left: 15px;
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
}

/* ------------------------------ */
/* 4. YouTube Consent Wall         */
/* ------------------------------ */
.yt-consent-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

.yt-consent-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

.yt-consent-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.yt-consent-placeholder:hover::before {
    background: rgba(0, 0, 0, 0.35);
}

.yt-consent-play-btn {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(200, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    margin-bottom: 12px;
}

.yt-consent-placeholder:hover .yt-consent-play-btn {
    background: #c80000;
    transform: scale(1.08);
}

.yt-consent-play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 3px;
}

.yt-consent-notice {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    padding: 0 20px;
    line-height: 1.4;
}

.yt-consent-notice span {
    color: #ff6b6b;
    font-weight: 500;
}

.yt-consent-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ------------------------------ */
/* 5. Blink animasyon (dikkat)    */
/* ------------------------------ */
@keyframes cookiePulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 2px 16px rgba(200, 0, 0, 0.3); }
}

.cookie-settings-float.unset {
    animation: cookiePulse 2s infinite;
}

/* ------------------------------ */
/* 6. Responsive                   */
/* ------------------------------ */
@media screen and (max-width: 768px) {
    .cookie-banner-inner {
        padding: 14px 16px;
        flex-direction: column;
        gap: 14px;
        align-items: stretch;
        text-align: center;
    }

    .cookie-banner-text {
        flex: none;
        font-size: 12px;
    }

    .cookie-banner-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

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

    .cookie-panel {
        margin: 10px;
        max-height: 90vh;
        border-radius: 10px;
    }

    .cookie-panel-header,
    .cookie-panel-subtitle,
    .cookie-panel-body,
    .cookie-panel-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .cookie-panel-title {
        font-size: 17px;
    }

    .cookie-panel-footer {
        flex-direction: column;
    }

    .cookie-panel-footer .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .yt-consent-play-btn {
        width: 50px;
        height: 50px;
    }

    .yt-consent-play-btn::after {
        border-width: 8px 0 8px 14px;
    }
}
