/* Çerez Onay Bildirimi - Zara Tarzı İki Aşamalı Sistem */

/* ============================================
   ALT BANNER (İlk Aşama)
   ============================================ */
#cookieConsentBannerBottom {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    color: #ffffff;
    padding: 16px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 99997;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

#cookieConsentBannerBottom.show {
    transform: translateY(0);
    display: block;
}

.cookie-banner-bottom-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-bottom-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    color: #ffffff;
}

.cookie-banner-bottom-text a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-banner-bottom-text a:hover {
    color: #e0e0e0;
}

.cookie-banner-bottom-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-banner-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.cookie-banner-btn-settings {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #ffffff;
}

.cookie-banner-btn-settings:hover {
    background: #f0f0f0;
}

.cookie-banner-btn-reject {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.cookie-banner-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cookie-banner-btn-accept {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #ffffff;
}

.cookie-banner-btn-accept:hover {
    background: #f0f0f0;
}

/* ============================================
   MODAL (İkinci Aşama)
   ============================================ */
/* Overlay (arka plan karartma) */
#cookieConsentOverlay {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998 !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    visibility: hidden;
}

#cookieConsentOverlay.show {
    display: block !important;
    opacity: 1;
    visibility: visible;
}

/* Ana Modal Container */
#cookieConsentBanner {
    display: none !important;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 99999 !important;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    visibility: hidden;
}

#cookieConsentBanner.show {
    display: block !important;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Modal İçerik */
.cookie-consent-container {
    padding: 30px;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Modal Başlık */
.cookie-consent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.cookie-consent-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.cookie-consent-title i {
    color: #1a1a1a;
    font-size: 20px;
}

.cookie-consent-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.cookie-consent-close:hover {
    background: #f8f9fa;
    color: #1a1a1a;
}

/* Açıklama Metni */
.cookie-consent-description {
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 25px;
}

.cookie-consent-description a {
    color: #1a1a1a;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-consent-description a:hover {
    text-decoration: none;
}

/* Çerez Kategorileri */
.cookie-categories {
    margin-bottom: 25px;
}

.cookie-category {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.cookie-category:hover {
    border-color: #dee2e6;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    cursor: pointer;
    background: #f8f9fa;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.cookie-category-header:hover {
    background: #e9ecef;
}

.cookie-category-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.cookie-category-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.cookie-category-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ced4da;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
}

.cookie-toggle.active {
    background: #1a1a1a;
}

.cookie-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle.active::after {
    transform: translateX(20px);
}

.cookie-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-toggle:not(:disabled):hover {
    opacity: 0.9;
}

.cookie-category-content {
    padding: 0 15px;
    background: #ffffff;
    font-size: 13px;
    line-height: 1.6;
    color: #6c757d;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.cookie-category.expanded .cookie-category-content {
    max-height: 500px;
    padding: 15px;
    opacity: 1;
}

.cookie-category-content p {
    margin: 0 0 12px 0;
}

.cookie-category-content p:last-child {
    margin-bottom: 0;
}

.cookie-category-content a {
    color: #1a1a1a;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-category-icon {
    font-size: 18px;
    color: #6c757d;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.cookie-category.expanded .cookie-category-icon {
    transform: rotate(45deg);
}

.expand-icon {
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}

/* Butonlar */
.cookie-consent-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.cookie-consent-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
}

.cookie-consent-btn-primary {
    background: #1a1a1a;
    color: #ffffff;
}

.cookie-consent-btn-primary:hover {
    background: #2c2c2c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.2);
}

.cookie-consent-btn-secondary {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #dee2e6;
}

.cookie-consent-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #1a1a1a;
}

.cookie-consent-btn-outline {
    background: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.cookie-consent-btn-outline:hover {
    background: #f8f9fa;
    color: #1a1a1a;
    border-color: #1a1a1a;
}

/* Mobil Görünüm - Alt Banner */
@media (max-width: 768px) {
    #cookieConsentBannerBottom {
        padding: 14px 16px;
    }
    
    .cookie-banner-bottom-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .cookie-banner-bottom-text {
        text-align: center;
        font-size: 12px;
    }
    
    .cookie-banner-bottom-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-banner-btn {
        width: 100%;
        padding: 12px;
    }
}

/* Mobil Görünüm - Modal */
@media (max-width: 768px) {
    #cookieConsentBanner {
        width: 95%;
        max-height: 90vh;
        top: 50%;
        transform: translate(-50%, -50%) scale(0.95);
        border-radius: 10px;
    }
    
    #cookieConsentBanner.show {
        transform: translate(-50%, -50%) scale(1);
    }
    
    .cookie-consent-container {
        padding: 20px;
        max-height: 90vh;
    }
    
    .cookie-consent-header {
        margin-bottom: 18px;
        padding-bottom: 12px;
    }
    
    .cookie-consent-title {
        font-size: 17px;
    }
    
    .cookie-consent-title i {
        font-size: 18px;
    }
    
    .cookie-consent-close {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    
    .cookie-consent-description {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 20px;
    }
    
    .cookie-categories {
        margin-bottom: 20px;
    }
    
    .cookie-category {
        margin-bottom: 10px;
    }
    
    .cookie-category-header {
        padding: 12px;
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
    }
    
    .cookie-category-title-wrapper {
        flex: 1 1 auto;
        min-width: 0;
        gap: 8px;
        overflow: hidden;
        display: flex;
        align-items: center;
    }
    
    .cookie-category-title {
        font-size: 14px;
        line-height: 1.3;
        word-break: break-word;
        overflow: hidden;
        margin: 0;
        flex: 1;
    }
    
    .cookie-category-icon {
        font-size: 16px;
        flex-shrink: 0;
        min-width: 18px;
    }
    
    .cookie-category-toggle-wrapper {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        min-width: fit-content;
    }
    
    .cookie-toggle {
        width: 40px;
        height: 22px;
        flex-shrink: 0;
        min-width: 40px;
    }
    
    .cookie-toggle::after {
        width: 18px;
        height: 18px;
        top: 2px;
        left: 2px;
    }
    
    .cookie-toggle.active::after {
        transform: translateX(18px);
    }
    
    .expand-icon {
        font-size: 14px !important;
        flex-shrink: 0;
        min-width: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .cookie-category-content {
        padding: 12px;
        font-size: 12px;
        line-height: 1.6;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .cookie-consent-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 14px;
        font-weight: 600;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    #cookieConsentBanner {
        width: 100%;
        max-height: 95vh;
        border-radius: 0;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: scale(0.95);
        max-width: none;
    }
    
    #cookieConsentBanner.show {
        transform: scale(1);
    }
    
    .cookie-consent-container {
        padding: 16px;
        max-height: 95vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .cookie-consent-header {
        position: sticky;
        top: 0;
        background: #ffffff;
        z-index: 10;
        border-bottom: 1px solid #e9ecef;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }
    
    .cookie-consent-title {
        font-size: 15px;
        gap: 8px;
    }
    
    .cookie-consent-title i {
        font-size: 15px;
    }
    
    .cookie-consent-close {
        width: 26px;
        height: 26px;
        font-size: 16px;
    }
    
    .cookie-consent-description {
        font-size: 11.5px;
        line-height: 1.65;
        margin-bottom: 16px;
    }
    
    .cookie-categories {
        margin-bottom: 16px;
    }
    
    .cookie-category {
        margin-bottom: 8px;
        border-radius: 6px;
    }
    
    .cookie-category-header {
        padding: 10px;
        flex-wrap: nowrap;
        gap: 6px;
        align-items: center;
    }
    
    .cookie-category-title-wrapper {
        flex: 1 1 auto;
        min-width: 0;
        gap: 6px;
        overflow: hidden;
        display: flex;
        align-items: center;
    }
    
    .cookie-category-title {
        font-size: 12.5px;
        line-height: 1.4;
        word-break: break-word;
        overflow: hidden;
        margin: 0;
        flex: 1;
    }
    
    .cookie-category-icon {
        font-size: 14px;
        flex-shrink: 0;
        min-width: 16px;
    }
    
    .cookie-category-toggle-wrapper {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        min-width: fit-content;
    }
    
    .cookie-toggle {
        width: 36px;
        height: 19px;
        flex-shrink: 0;
        min-width: 36px;
    }
    
    .cookie-toggle::after {
        width: 15px;
        height: 15px;
        top: 2px;
        left: 2px;
    }
    
    .cookie-toggle.active::after {
        transform: translateX(17px);
    }
    
    .expand-icon {
        font-size: 12px !important;
        flex-shrink: 0;
        min-width: 16px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .cookie-category-content {
        padding: 10px;
        font-size: 11px;
        line-height: 1.6;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 16px;
        padding-top: 18px;
        position: sticky;
        bottom: 0;
        background: #ffffff;
        z-index: 10;
        border-top: 1px solid #e9ecef;
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .cookie-consent-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
        font-weight: 600;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        line-height: 1.5;
    }
}

/* Tablet Görünüm (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .cookie-category-header {
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
    }
    
    .cookie-category-title-wrapper {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        gap: 10px;
    }
    
    .cookie-category-title {
        word-break: break-word;
        overflow: hidden;
        flex: 1;
    }
    
    .cookie-category-toggle-wrapper {
        flex-shrink: 0;
        margin-left: auto;
        min-width: fit-content;
        gap: 8px;
    }
    
    .cookie-toggle {
        flex-shrink: 0;
        min-width: 44px;
    }
    
    .expand-icon {
        flex-shrink: 0;
        min-width: 20px;
    }
    
    .cookie-consent-btn {
        padding: 12px 24px;
        min-height: 44px;
        font-size: 14px;
    }
}

/* Küçük Tablet ve Büyük Telefon (577px - 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    .cookie-category-header {
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }
    
    .cookie-category-title-wrapper {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }
    
    .cookie-category-title {
        font-size: 13.5px;
        word-break: break-word;
        overflow: hidden;
        flex: 1;
    }
    
    .cookie-category-toggle-wrapper {
        flex-shrink: 0;
        margin-left: auto;
        min-width: fit-content;
        gap: 6px;
    }
    
    .cookie-toggle {
        flex-shrink: 0;
        min-width: 38px;
    }
    
    .expand-icon {
        flex-shrink: 0;
        min-width: 18px;
    }
    
    .cookie-consent-btn {
        padding: 12px 24px;
        min-height: 48px;
        font-size: 14px;
    }
}
