/**
 * Cookie Consent Banner - GDPR & KVKK Compliant
 * Modern, Responsive Design
 * @version 1.0
 */

/* Cookie Banner Container */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: slideUp 0.5s ease-out 0.5s forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

#cookie-banner.hidden {
    transform: translateY(100%);
    pointer-events: none;
}

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

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

.cookie-banner-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.95;
}

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

/* Cookie Banner Buttons */
.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cookie-btn-primary {
    background: #ffffff;
    color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-btn-text {
    background: transparent;
    color: #ffffff;
    text-decoration: underline;
    padding: 12px 16px;
}

.cookie-btn-text:hover {
    opacity: 0.8;
}

/* Cookie Settings Modal */
#cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#cookie-settings-modal.active {
    display: flex;
}

.cookie-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 16px 16px 0 0;
}

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

.cookie-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

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

.cookie-category {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cookie-category-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category-desc {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
}

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

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

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

.cookie-toggle input:checked+.cookie-toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.cookie-toggle input:disabled+.cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle-label {
    font-size: 12px;
    color: #6c757d;
    margin-left: 8px;
    font-weight: 600;
}

.cookie-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

/* Compliance Badges */
.cookie-compliance-badges {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.compliance-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.compliance-badge i {
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner-text {
        min-width: 100%;
    }

    .cookie-banner-actions {
        width: 100%;
        justify-content: stretch;
    }

    .cookie-btn {
        flex: 1;
        justify-content: center;
    }

    .cookie-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    .cookie-modal-header {
        padding: 16px;
    }

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

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

    .cookie-category {
        padding: 16px;
    }

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

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #cookie-banner {
        padding: 16px;
    }

    .cookie-banner-text h3 {
        font-size: 16px;
    }

    .cookie-banner-text p {
        font-size: 13px;
    }

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

    .compliance-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* Print Styles */
@media print {

    #cookie-banner,
    #cookie-settings-modal {
        display: none !important;
    }
}

/* Accessibility */
.cookie-btn:focus,
.cookie-toggle input:focus+.cookie-toggle-slider,
.cookie-modal-close:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .cookie-modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }

    .cookie-category {
        background: #1a202c;
    }

    .cookie-category-title {
        color: #e2e8f0;
    }

    .cookie-category-desc {
        color: #a0aec0;
    }

    .cookie-modal-footer {
        background: #1a202c;
        border-top-color: #4a5568;
    }
}