/* ========================================
   KVKK/GDPR Uyumlu Çerez Yönetim Sistemi
   Kurumsal & Compact Tasarım
   ======================================== */

/* Ana Popup Stili - Sağ Alt Köşe */
.cookie-consent-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-width: 90%;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 22px;
    z-index: 999999;
    animation: slideInRight 0.4s ease-out;
    display: none; /* Başlangıçta gizli */
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cookie-content {
    text-align: left;
}

.cookie-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border-bottom: 2px solid #fab316;
    padding-bottom: 8px;
}

.cookie-description {
    font-size: 12px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 16px 0;
    text-align: justify;
}

/* Butonlar */
.cookie-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cookie-info-buttons {
    display: flex;
    gap: 8px;
}

.cookie-action-buttons {
    display: flex;
    gap: 8px;
}

.cookie-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    flex: 1;
}

.cookie-more-info-btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.cookie-more-info-btn:hover {
    background: #e9ecef;
    border-color: #fab316;
    color: #333;
    text-decoration: none;
}

.cookie-accept-btn {
    flex: 1;
    background: #fab316;
    color: #2c3e50;
}

.cookie-accept-btn:hover {
    background: #e5a414;
}

.cookie-reject-btn {
    flex: 1;
    background: #6c757d;
    color: white;
}

.cookie-reject-btn:hover {
    background: #5a6268;
}

/* Modal Stili - Compact */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    display: none;
    animation: fadeIn 0.3s ease;
}

.cookie-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.cookie-modal-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    background: white;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal Header - Compact */
.cookie-modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2c3e50;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.cookie-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Modal Body - Compact */
.cookie-modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
}

.cookie-intro {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 18px;
    padding: 12px;
    background: #fff9e6;
    border-left: 3px solid #fab316;
    border-radius: 4px;
}

/* Çerez Kategorileri - Compact */
.cookie-category {
    margin-bottom: 16px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.cookie-category-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    background: #f8f9fa;
    cursor: pointer;
}

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

.cookie-category-title h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.cookie-category-title p {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.cookie-required {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.cookie-optional {
    background: #17a2b8;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Toggle Switch - Compact */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

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

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: #fab316;
}

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

input:disabled + .cookie-slider {
    background-color: #28a745;
    cursor: not-allowed;
}

/* Çerez Detayları - Compact */
.cookie-details {
    padding: 14px;
    background: white;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.cookie-table thead {
    background: #f8f9fa;
}

.cookie-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.cookie-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    color: #2c3e50;
}

.cookie-table tbody tr:hover {
    background: #fff9e6;
}

.cookie-table code {
    background: #f8f9fa;
    padding: 3px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #fab316;
    font-size: 11px;
    font-weight: 600;
}

.cookie-policy-link {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.cookie-policy-link a {
    color: #fab316;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.cookie-policy-link a:hover {
    text-decoration: underline;
}

/* Modal Footer - Compact */
.cookie-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    background: #f8f9fa;
}

.cookie-save-btn {
    background: #fab316;
    color: #2c3e50;
    flex: 1;
}

.cookie-save-btn:hover {
    background: #e5a414;
}

.cookie-cancel-btn {
    background: white;
    color: #6c757d;
    border: 1px solid #6c757d;
    flex: 1;
}

.cookie-cancel-btn:hover {
    background: #6c757d;
    color: white;
}

/* Sabit Çerez Ayarları Butonu - Sağ Alt Köşe */
.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fab316;
    color: #2c3e50;
    border: none;
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 999998;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cookie-settings-btn:hover {
    background: #e5a414;
    box-shadow: 0 4px 15px rgba(250, 179, 22, 0.3);
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .cookie-consent-popup {
        width: 95%;
        right: 2.5%;
        bottom: 10px;
        padding: 20px;
    }

    .cookie-title {
        font-size: 16px;
    }

    .cookie-description {
        font-size: 12px;
    }

    .cookie-action-buttons {
        flex-direction: column;
    }
    
    .cookie-info-buttons {
        flex-direction: column;
    }

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

    .cookie-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-modal-header {
        padding: 18px 20px;
    }

    .cookie-modal-header h2 {
        font-size: 18px;
    }

    .cookie-modal-body {
        padding: 20px;
    }

    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
    }

    .cookie-table {
        font-size: 11px;
    }

    .cookie-table th,
    .cookie-table td {
        padding: 8px;
    }

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

    .cookie-settings-btn {
        padding: 8px 12px;
        font-size: 11px;
        bottom: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-popup {
        border-radius: 6px;
        padding: 16px;
    }

    .cookie-title {
        font-size: 15px;
    }

    .cookie-description {
        font-size: 11px;
    }

    .cookie-btn {
        padding: 10px 14px;
        font-size: 11px;
    }

    .cookie-modal-header h2 {
        font-size: 16px;
    }

    .cookie-category-title h3 {
        font-size: 16px;
    }
}
