/* Cookie Consent Styles */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2b2b2b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.3);
    padding: 2rem 0;
    z-index: 1040;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

/* Blocking backdrop when banner is shown */
.cookie-consent-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1039;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: auto;
}

.cookie-consent-backdrop.show {
    opacity: 1;
}

/* Prevent body scroll when consent is active */
body.cookie-consent-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.cookie-consent-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #ffffff;
    font-family: 'Museo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cookie-consent-description {
    font-size: 1.125rem;
    color: #e9ecef;
    margin-bottom: 0;
    line-height: 1.7;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cookie-consent-link {
    color: #f8a5ad;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cookie-consent-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

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

.cookie-consent-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: none;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    flex: 0 0 auto;
    box-sizing: border-box;
}

/* Customized button styles to match site design */
.cookie-consent-btn.btn-secondary {
    background-color: #6c757d;
    border: 1px solid #6c757d;
    color: #ffffff;
}

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

.cookie-consent-btn.btn-outline-light {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
}

.cookie-consent-btn.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
}

.cookie-consent-btn.btn-primary {
    background-color: #B83241;
    border: 1px solid #B83241;
    color: #ffffff;
}

.cookie-consent-btn.btn-primary:hover {
    background-color: #922836;
    border-color: #922836;
}

/* Cookie Preferences Modal */
.cookie-category {
    padding: 2rem;
    background-color: #343a40;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.cookie-category:hover {
    background-color: #3d444b;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cookie-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.75rem;
    font-family: 'Museo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cookie-category-description {
    font-size: 1.25rem;
    color: #adb5bd;
    margin-bottom: 0;
    line-height: 1.7;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Custom switch styling */
.form-switch .form-check-input {
    width: 4em;
    height: 2em;
    background-color: #495057;
    border-color: #495057;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    background-color: #B83241;
    border-color: #B83241;
}

.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(184, 50, 65, 0.25);
    border-color: #B83241;
}

/* Disabled state for essential cookies */
.form-switch .form-check-input:disabled {
    opacity: 1;
    background-color: #28a745;
    border-color: #28a745;
}

/* Modal customizations */
#cookiePreferencesModal .modal-dialog {
    max-width: 800px;
}

#cookiePreferencesModal .modal-dialog .modal-content {
    padding: 1rem;
}

#cookiePreferencesModal .modal-content {
    background-color: #2b2b2b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

#cookiePreferencesModal .modal-header {
    background-color: #2b2b2b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 1.5rem 2rem;
}

#cookiePreferencesModal .modal-title {
    font-family: 'Museo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 2.5rem;
    color: #ffffff;
}

#cookiePreferencesModal .modal-body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.375rem;
    line-height: 1.7;
    color: #e9ecef;
}

#cookiePreferencesModal .modal-body > p:first-child {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #ffffff;
}

#cookiePreferencesModal .modal-footer {
    background-color: #2b2b2b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

#cookiePreferencesModal .btn-close {
    background-color: transparent;
    border: none;
    opacity: 1;
    width: 2rem;
    height: 2rem;
    padding: 0;
    position: relative;
}

#cookiePreferencesModal .btn-close::before,
#cookiePreferencesModal .btn-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #ffffff;
    top: 50%;
    left: 50%;
    transition: all 0.2s ease;
}

#cookiePreferencesModal .btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

#cookiePreferencesModal .btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#cookiePreferencesModal .btn-close:hover::before,
#cookiePreferencesModal .btn-close:hover::after {
    background-color: #B83241;
}

#cookiePreferencesModal .alert-info {
    color: #ffffff;
    background-color: rgba(108, 117, 125, 0.2);
    border: 1px solid rgba(108, 117, 125, 0.3);
    font-size: 1.25rem;
    padding: 1.25rem 1.5rem;
}

#cookiePreferencesModal .alert-info i {
    color: #6c757d;
}

/* Modal buttons */
.cookie-modal-btn {
    padding: 1.125rem 2.5rem;
    font-size: 1.375rem;
    font-weight: 500;
    min-width: 160px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: none;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0 0.5rem;
    box-sizing: border-box;
}

.cookie-modal-btn.btn-secondary {
    background-color: #6c757d;
    border: 1px solid #6c757d;
    color: #ffffff;
}

.cookie-modal-btn.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

.cookie-modal-btn.btn-outline-secondary {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
}

.cookie-modal-btn.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
}

.cookie-modal-btn.btn-primary {
    background-color: #B83241;
    border: 1px solid #B83241;
    color: #ffffff;
}

.cookie-modal-btn.btn-primary:hover {
    background-color: #922836;
    border-color: #922836;
}

/* Toast notifications */
.toast-container {
    z-index: 1055;
    bottom: 20px !important;
    right: 20px !important;
}

/* Override Bootstrap toast defaults */
.toast:not(.showing):not(.show) {
    display: none;
}

.toast.show {
    display: block;
}

.toast {
    min-width: auto;
    max-width: fit-content;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
    animation: slideInRight 0.3s ease-out;
    background-color: #2b2b2b !important;
    border: none !important;
}

.toast.custom-toast {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.bg-success {
    background-color: #2b2b2b !important;
    border-left: 4px solid #B83241 !important;
}

.toast.bg-danger {
    background-color: #2b2b2b !important;
    border-left: 4px solid #dc3545 !important;
}

.toast.bg-info {
    background-color: #2b2b2b !important;
    border-left: 4px solid #6c757d !important;
}

.toast-body {
    font-size: 1.25rem;
    font-weight: 500;
    padding: 1.25rem 3rem 1.25rem 1.5rem;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #ffffff;
    background-color: #2b2b2b !important;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    border: none !important;
    margin: 0 !important;
    min-height: auto !important;
}

.toast-body i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast.bg-success .toast-body i {
    color: #B83241;
    animation: subtlePulse 2s ease-in-out;
}

.toast.bg-danger .toast-body i {
    color: #dc3545;
    animation: subtlePulse 2s ease-in-out;
}

.toast.bg-info .toast-body i {
    color: #6c757d;
    animation: subtlePulse 2s ease-in-out;
}

@keyframes subtlePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
}

.toast .btn-close,
.toast .btn-close-white {
    position: absolute !important;
    top: 50% !important;
    right: 0.75rem !important;
    transform: translateY(-50%) !important;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    background-size: 0.875rem;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
    border: none !important;
}

.toast .btn-close:hover,
.toast .btn-close-white:hover {
    opacity: 1;
}

.toast .btn-close:focus {
    box-shadow: none;
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

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

/* Toast positioning adjustments */
.toast {
    margin-bottom: 0.5rem;
}

.toast:last-child {
    margin-bottom: 0;
}

/* Force toast structure to prevent grey backgrounds */
.toast > * {
    background-color: transparent !important;
}

.toast-header {
    display: none !important;
}

/* Cookie modal icon colors and sizes */
#cookiePreferencesModal .fa-lock {
    color: #28a745 !important;
    font-size: 1.375rem;
}

#cookiePreferencesModal .fa-chart-bar {
    color: #17a2b8 !important;
    font-size: 1.375rem;
}

#cookiePreferencesModal .fa-bullhorn {
    color: #ffc107 !important;
    font-size: 1.375rem;
}

#cookiePreferencesModal .fa-cog {
    color: #6c757d !important;
    font-size: 1.375rem;
}

/* Tablet breakpoint */
@media (max-width: 991px) {
    .cookie-consent-banner .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .cookie-consent-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .cookie-consent-btn {
        min-width: 120px;
    }
}

/* Mobile responsive design */
@media (max-width: 767px) {
    .cookie-consent-title {
        font-size: 1.75rem !important;
    }
    
    .cookie-consent-description {
        font-size: 1.25rem !important;
        line-height: 1.6 !important;
    }
    
    .cookie-consent-link {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 767px) {
    #cookiePreferencesModal .modal-footer {
        padding: 1.5rem 1rem;
    }
    
    #cookiePreferencesModal .modal-footer .cookie-modal-btn {
        width: 100%;
        margin: 0;
        display: block;
        max-width: none;
        min-width: 100%;
    }
    
    #cookiePreferencesModal .modal-footer {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 576px) {
    .cookie-consent-banner {
        padding: 1.5rem 0;
        width: 100%;
        left: 0;
        right: 0;
    }
    
    .cookie-consent-banner .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .cookie-consent-banner .row {
        margin-left: -15px;
        margin-right: -15px;
    }
    
    .cookie-consent-banner .col-12 {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .cookie-consent-title {
        font-size: 1.75rem !important;
        margin-bottom: 0.75rem;
    }
    
    .cookie-consent-description {
        font-size: 1.25rem !important;
        line-height: 1.6;
        margin-bottom: 1.25rem !important;
    }
    
    .cookie-consent-buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        padding: 0 15px;
        margin: 0;
        align-items: stretch;
    }
    
    .cookie-consent-btn {
        width: 100% !important;
        margin: 0 !important;
        padding: 1rem 1.5rem;
        font-size: 1.125rem !important;
        border-radius: 4px;
        white-space: normal;
        text-align: center;
        box-sizing: border-box;
        display: block;
        flex: none;
    }
    
    .form-switch .form-check-input {
        width: 2.5em;
        height: 1.25em;
    }
    
    .toast-container {
        bottom: 10px !important;
        right: 10px !important;
        left: 10px !important;
    }
    
    .toast {
        min-width: auto;
        max-width: calc(100% - 20px);
        margin-left: auto;
        margin-right: auto;
    }
    
    .toast-body {
        padding: 1.125rem 3rem 1.125rem 1.25rem;
        font-size: 1.125rem;
    }
    
    .toast-body i {
        font-size: 1.125rem;
    }
    
    .toast .btn-close,
    .toast .btn-close-white {
        right: 0.5rem;
    }
}

/* Accessibility improvements */
.cookie-consent-banner:focus-within {
    outline: 2px solid #0066cc;
    outline-offset: -2px;
}

.cookie-consent-btn:focus,
.form-check-input:focus,
.btn-close:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background-color: #212529;
        border-top-color: #495057;
        color: #f8f9fa;
    }
    
    .cookie-consent-title {
        color: #f8f9fa;
    }
    
    .cookie-consent-description {
        color: #adb5bd;
    }
    
    .cookie-category {
        background-color: #343a40;
        border-color: #495057;
    }
    
    .cookie-category-title {
        color: #f8f9fa;
    }
    
    .cookie-category-description {
        color: #adb5bd;
    }
}

/* Animation for smooth appearance */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-banner.show {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Footer link styling */
.footer-link.cookie-settings {
    cursor: pointer;
    color: #6c757d;
    text-decoration: none;
}

.footer-link.cookie-settings:hover {
    color: #495057;
    text-decoration: underline;
}