/**
 * Cookie Consent Banner Styles
 * GDPR Compliance Phase 2.3
 *
 * Accessible, modern cookie consent banner
 * - Mobile responsive
 * - High contrast for accessibility
 * - Smooth animations
 * - Keyboard navigation support
 */

.cookie-consent-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    border-top: 3px solid #39d353;
    max-height: 90vh;
    overflow-y: auto;
    transition: bottom 0.3s ease-in-out;
}

.cookie-consent-banner.show {
    bottom: 0;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.cookie-consent-header {
    margin-bottom: 1rem;
}

.cookie-consent-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-consent-title i {
    color: #39d353;
}

.cookie-consent-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.cookie-consent-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.consent-types-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.consent-type-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #39d353;
}

.consent-type-header {
    margin-bottom: 0.5rem;
}

.consent-type-purpose {
    margin-top: 0.5rem;
    padding-left: 2rem;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.cookie-consent-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
}

/* Button Styles */
.cookie-consent-actions .btn,
.cookie-consent-footer .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cookie-consent-actions .btn-success {
    background: #39d353;
    border-color: #39d353;
    color: #fff;
}

.cookie-consent-actions .btn-success:hover {
    background: #2ec248;
    border-color: #2ec248;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(57, 211, 83, 0.3);
}

.cookie-consent-actions .btn-outline-secondary {
    border: 1.5px solid #6c757d;
    color: #6c757d;
}

.cookie-consent-actions .btn-outline-secondary:hover {
    background: #6c757d;
    color: #fff;
}

.cookie-consent-actions .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
}

.cookie-consent-actions .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

.cookie-consent-footer .btn-primary {
    background: #007bff;
    border-color: #007bff;
    min-width: 200px;
}

.cookie-consent-footer .btn-primary:hover {
    background: #0056b3;
    border-color: #004085;
}

/* Custom Switch Styles */
.consent-type-item .custom-switch {
    padding-left: 2.5rem;
}

.consent-type-item .custom-control-label {
    cursor: pointer;
    user-select: none;
}

.consent-type-item .custom-control-input:disabled ~ .custom-control-label {
    color: #495057;
    cursor: not-allowed;
}

/* Toast Messages */
.consent-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 1rem;
    }

    .cookie-consent-title {
        font-size: 1.1rem;
    }

    .cookie-consent-description {
        font-size: 0.9rem;
    }

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

    .cookie-consent-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .consent-types-list {
        max-height: 250px;
    }

    .consent-type-item {
        padding: 0.75rem;
    }

    .consent-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }

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

@media (max-width: 480px) {
    .cookie-consent-title {
        font-size: 1rem;
    }

    .cookie-consent-description {
        font-size: 0.85rem;
    }

    .cookie-consent-actions .btn,
    .cookie-consent-footer .btn {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: #1e1e1e;
        border-top-color: #39d353;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    }

    .cookie-consent-title {
        color: #e0e0e0;
    }

    .cookie-consent-description {
        color: #b0b0b0;
    }

    .consent-type-item {
        background: #2a2a2a;
        border-left-color: #39d353;
    }

    .cookie-consent-details {
        border-top-color: #3a3a3a;
    }

    .cookie-consent-footer {
        border-top-color: #3a3a3a;
    }

    .consent-type-purpose small {
        color: #909090 !important;
    }
}

/* Accessibility */
.cookie-consent-banner:focus {
    outline: 2px solid #39d353;
    outline-offset: -2px;
}

.consent-type-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(57, 211, 83, 0.25);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top-width: 4px;
    }

    .consent-type-item {
        border-left-width: 4px;
    }

    .cookie-consent-actions .btn {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner {
        transition: none;
    }

    .consent-toast {
        animation: none;
    }

    .cookie-consent-actions .btn:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .cookie-consent-banner {
        display: none;
    }
}
