/* Cookie consent banner and preferences modal – design system light/dark */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: none;
    background: var(--bg-card);
    color: var(--text-primary);
    border-top: 1px solid var(--border-color);
}

.cookie-consent-banner.is-visible {
    display: block;
}

.cookie-consent-banner .cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.cookie-consent-banner .cookie-consent-text {
    flex: 1;
    min-width: 200px;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.cookie-consent-banner .cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Small anchor link for Privacy policy (not a button) */
.cookie-consent-banner .cookie-consent-privacy-link {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-decoration: underline;
    white-space: nowrap;
}
.cookie-consent-banner .cookie-consent-privacy-link:hover {
    color: var(--text-primary);
}

/* All banner buttons same small size, theme-aligned */
.cookie-consent-banner .cookie-consent-btn {
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
    line-height: 1.35;
    min-height: unset;
    white-space: nowrap;
    border-width: 1px;
}
.cookie-consent-btn-secondary,
.cookie-consent-btn-primary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.cookie-consent-btn-secondary:hover,
.cookie-consent-btn-primary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.cookie-consent-btn-accept {
    background: var(--gradient-main);
    border: none;
    color: #fff;
}
.cookie-consent-btn-accept:hover {
    opacity: 0.92;
    color: #fff;
}

/* Cookie preferences modal – above blur (z-index) and theme-aligned */
#cookiePreferencesModal.modal {
    z-index: 1077 !important;
}
#cookiePreferencesModal.modal.show .modal-dialog {
    z-index: 1078 !important;
}
body.modal-open:has(#cookiePreferencesModal.show) .modal-backdrop,
body.modal-open:has(#cookiePreferencesModal.show) .modal-backdrop.show,
#cookiePreferencesModal.show ~ .modal-backdrop,
body:has(#cookiePreferencesModal.show) .modal-backdrop {
    z-index: 1076 !important;
}

#cookiePreferencesModal .modal-content {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
}

#cookiePreferencesModal .modal-header {
    border-bottom-color: var(--border-color);
}
#cookiePreferencesModal .modal-header .modal-title,
#cookiePreferencesModal .modal-body,
#cookiePreferencesModal .modal-body .text-muted {
    color: var(--text-primary);
}
#cookiePreferencesModal .modal-body .text-muted {
    color: var(--text-secondary);
}
#cookiePreferencesModal .modal-footer {
    border-top-color: var(--border-color);
}

#cookiePreferencesModal .form-check-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
#cookiePreferencesModal .cookie-category-essential .form-check-input:disabled {
    cursor: default;
}

/* Smaller buttons in modal footer */
#cookiePreferencesModal .modal-footer .btn {
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
    line-height: 1.35;
    min-height: unset;
}
#cookiePreferencesModal .modal-footer .btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
#cookiePreferencesModal .modal-footer .btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}
#cookiePreferencesModal .modal-footer .btn-primary {
    background: var(--gradient-main);
    border: none;
    color: #fff;
}
#cookiePreferencesModal .modal-footer .btn-primary:hover {
    opacity: 0.92;
    color: #fff;
}
