/**
 * Cookie Consent Banner Styles
 * Horizon CRM - GDPR Compliant
 * 
 * Modern, accessible design with Bootstrap 5 integration
 */

/* Banner Container */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 1.5rem;
    border-top: 3px solid #0d6efd;
    animation: slideUp 0.4s ease-out;
}

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

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

.cookie-consent-message {
    flex: 1;
}

.cookie-consent-message p {
    margin: 0;
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.5;
}

.cookie-consent-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-privacy-link {
    font-size: 0.875rem;
    color: #6c757d;
    text-decoration: underline;
    white-space: nowrap;
}

.cookie-privacy-link:hover {
    color: #0d6efd;
}

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

    .cookie-consent-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cookie-consent-buttons .btn {
        width: 100%;
    }

    .cookie-privacy-link {
        text-align: center;
        display: block;
        width: 100%;
    }
}

/* Preferences Modal */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

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

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

.cookie-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

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

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

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #212529;
    font-weight: 600;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    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;
}

.cookie-modal-close:hover {
    background: #f8f9fa;
    color: #000;
}

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

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0d6efd;
}

.cookie-category-header {
    margin-bottom: 0.5rem;
}

.cookie-category-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.cookie-category-label input[type="checkbox"]:not(:disabled) {
    cursor: pointer;
}

.cookie-category-label input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-category-desc {
    font-size: 0.875rem;
    margin: 0;
    padding-left: 1.75rem;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Mobile Modal Styles */
@media (max-width: 576px) {
    .cookie-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-modal-header {
        padding: 1rem;
    }

    .cookie-modal-header h3 {
        font-size: 1.25rem;
    }

    .cookie-modal-body {
        padding: 1rem;
    }

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

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

/* Accessibility - Focus Styles */
.cookie-consent-buttons .btn:focus,
.cookie-modal-close:focus,
.cookie-category-label input:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Print Styles - Hide banner/modal when printing */
@media print {
    .cookie-consent-banner,
    .cookie-preferences-modal {
        display: none !important;
    }
}
