/* ============================================
   Cookie Consent Banner & Modal
   GDPR/AVG Compliant
   ============================================ */

/* Cookie Banner */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 1.5rem;
    animation: slideUp 0.4s ease-out;
}

#cookie-consent-banner.hide {
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.cookie-consent-content h3 {
    margin: 0 0 0.75rem 0;
    color: #2E6E9E;
    font-size: 1.25rem;
}

.cookie-consent-content p {
    margin: 0.5rem 0;
    color: #4A4A4A;
    line-height: 1.6;
    font-size: 0.95rem;
}

.cookie-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.cookie-details strong {
    color: #2E2E2E;
}

.cookie-note {
    font-size: 0.875rem;
    font-style: italic;
    color: #666;
}

.cookie-consent-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 250px;
}

.cookie-consent-buttons .btn {
    white-space: nowrap;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.cookie-consent-buttons .btn-primary {
    background: #2E6E9E;
    color: white;
}

.cookie-consent-buttons .btn-primary:hover {
    background: #1f4d6b;
}

.cookie-consent-buttons .btn-secondary {
    background: white;
    color: #2E6E9E;
    border: 2px solid #2E6E9E;
}

.cookie-consent-buttons .btn-secondary:hover {
    background: #f8f9fa;
}

/* Cookie Settings Modal */
#cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease-out;
}

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

.cookie-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

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

.cookie-modal-content h2 {
    margin: 0 0 1.5rem 0;
    color: #2E6E9E;
    font-size: 1.75rem;
}

.cookie-category {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.cookie-category-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}

.cookie-category h4 {
    margin: 0 0 0.5rem 0;
    color: #2E2E2E;
    font-size: 1.125rem;
}

.cookie-category p {
    margin: 0;
    color: #666;
    font-size: 0.875rem;
    line-height: 1.5;
}

.required {
    color: #28a745;
    font-size: 0.75rem;
    font-weight: 600;
    background: #d4edda;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.optional {
    color: #666;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.cookie-list {
    list-style: none;
    padding: 1rem 0 0 0;
    margin: 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 1rem;
}

.cookie-list li {
    padding: 0.5rem 0;
    color: #666;
    font-size: 0.875rem;
}

.cookie-list strong {
    color: #2E2E2E;
    font-family: monospace;
}

.cookie-list em {
    color: #999;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.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: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: #2E6E9E;
}

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

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

/* Modal Buttons */
.cookie-modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.cookie-modal-buttons .btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-modal-buttons .btn-primary {
    background: #2E6E9E;
    color: white;
}

.cookie-modal-buttons .btn-primary:hover {
    background: #1f4d6b;
}

.cookie-modal-buttons .btn-secondary {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
}

.cookie-modal-buttons .btn-secondary:hover {
    background: #f8f9fa;
    border-color: #2E6E9E;
    color: #2E6E9E;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cookie-consent-buttons {
        min-width: auto;
    }

    .cookie-modal-content {
        padding: 1.5rem;
    }

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

    .cookie-category-header {
        grid-template-columns: 1fr;
    }

    .cookie-switch {
        margin-bottom: 1rem;
    }
}

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

    .cookie-consent-content h3 {
        font-size: 1.125rem;
    }

    .cookie-modal-content h2 {
        font-size: 1.5rem;
    }
}
