/**
 * Cookie Consent Styles
 * KVKK/GDPR Uyumlu Çerez Onay Sistemi
 */

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    padding: 20px;
    z-index: 2147483647;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    pointer-events: auto;
}

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

.cookie-banner * {
    pointer-events: auto;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-icon {
    font-size: 32px;
    color: #f59e0b;
    flex-shrink: 0;
}

.cookie-banner-text {
    flex: 1;
    min-width: 280px;
}

.cookie-banner-text h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Cookie Buttons */
.cookie-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: #1f2937;
    color: #fff;
}

.cookie-btn-primary:hover {
    background: #111827;
}

.cookie-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #f1f1f1;
}

.cookie-btn-secondary:hover {
    background: #e5e7eb;
}

.cookie-btn-outline {
    background: transparent;
    color: #374151;
    border: 1px solid #d1d5db;
}

.cookie-btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.cookie-btn-accent {
    background: #fff;
    color: #1f2937;
    border: 1px solid #1f2937;
}

.cookie-btn-accent:hover {
    background: #f9fafb;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cookie-modal.show * {
    pointer-events: auto;
}

.cookie-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.cookie-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 560px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f1f1;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.cookie-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.cookie-modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.cookie-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cookie-intro h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.cookie-intro p {
    margin: 0 0 24px 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

/* Cookie Categories */
.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-category {
    border: 1px solid #f1f1f1;
    border-radius: 6px;
    overflow: hidden;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-category-header:hover {
    background: #f9fafb;
}

.cookie-category-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-category-info i {
    font-size: 16px;
    color: #6b7280;
    width: 20px;
    text-align: center;
}

.cookie-category-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.cookie-category-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-category-arrow {
    font-size: 12px;
    color: #9ca3af;
    transition: transform 0.3s;
}

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

.cookie-category-body {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.cookie-category.open .cookie-category-body {
    padding: 0 16px 16px;
    max-height: 200px;
}

.cookie-category-body p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

/* Cookie Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: all 0.3s;
}

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

.cookie-switch input:checked + .cookie-slider {
    background: #3b82f6;
}

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

.cookie-slider.required {
    background: #3b82f6;
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-slider.required:before {
    transform: translateX(20px);
}

/* Cookie Modal Footer */
.cookie-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #f1f1f1;
    background: #f9fafb;
    flex-wrap: wrap;
}

.cookie-modal-footer .cookie-btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .cookie-banner-icon {
        display: none;
    }
    
    .cookie-banner-text {
        min-width: unset;
    }
    
    .cookie-banner-text h4 {
        font-size: 15px;
    }
    
    .cookie-banner-text p {
        font-size: 12px;
    }
    
    .cookie-banner-actions {
        width: 100%;
        justify-content: center;
        flex-direction: column;
        gap: 8px;
    }
    
    .cookie-btn {
        padding: 14px 20px;
        font-size: 14px;
        width: 100%;
        min-height: 48px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        pointer-events: auto;
        position: relative;
        z-index: 10;
    }
    
    .cookie-modal-content {
        max-height: 85vh;
        margin: 10px;
    }
    
    .cookie-modal-header h3 {
        font-size: 14px;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}
