/**
 * Privacy Compliance Module - Modern Luxury Design v2.1
 * Compatible with Rocket LMS design_1 theme & dark/light modes
 */

/* ----------------------------------------------------
   1. Cookie Consent Banner - Base & Positions
   ---------------------------------------------------- */
.privacy-consent-banner {
    position: fixed;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #f8fafc;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Position: Centered Floating Pill (Default) */
.privacy-consent-banner.privacy-pos-bottom-center,
.privacy-consent-banner.privacy-pos-bottom_center {
    bottom: 24px;
    left: 24px;
    right: 24px;
    max-width: 1040px;
    margin: 0 auto;
    border-radius: 20px;
    padding: 20px 26px;
    animation: privacySlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Position: Full Width Bottom Bar */
.privacy-consent-banner.privacy-pos-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 18px 32px;
    animation: privacySlideUpBar 0.35s ease forwards;
}

/* Position: Floating Bottom Left */
.privacy-consent-banner.privacy-pos-bottom-left,
.privacy-consent-banner.privacy-pos-bottom_left {
    bottom: 24px;
    left: 24px;
    right: auto;
    max-width: 440px;
    border-radius: 20px;
    padding: 22px 24px;
    animation: privacySlideUpLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Position: Floating Bottom Right */
.privacy-consent-banner.privacy-pos-bottom-right,
.privacy-consent-banner.privacy-pos-bottom_right {
    bottom: 24px;
    right: 24px;
    left: auto;
    max-width: 440px;
    border-radius: 20px;
    padding: 22px 24px;
    animation: privacySlideUpRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Position: Center Screen Modal */
.privacy-consent-banner.privacy-pos-modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    bottom: auto;
    right: auto;
    max-width: 540px;
    width: 90%;
    border-radius: 24px;
    padding: 28px;
    animation: privacyPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes privacySlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes privacySlideUpBar {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes privacySlideUpLeft {
    from { opacity: 0; transform: translateY(30px) translateX(-20px); }
    to { opacity: 1; transform: translateY(0) translateX(0); }
}
@keyframes privacySlideUpRight {
    from { opacity: 0; transform: translateY(30px) translateX(20px); }
    to { opacity: 1; transform: translateY(0) translateX(0); }
}
@keyframes privacyPopIn {
    from { opacity: 0; transform: translate(-50%, -46%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Compact layout for bottom-left, bottom-right, and modal */
.privacy-consent-banner.privacy-pos-bottom-left .privacy-banner-container,
.privacy-consent-banner.privacy-pos-bottom_left .privacy-banner-container,
.privacy-consent-banner.privacy-pos-bottom-right .privacy-banner-container,
.privacy-consent-banner.privacy-pos-bottom_right .privacy-banner-container,
.privacy-consent-banner.privacy-pos-modal .privacy-banner-container {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
}

.privacy-consent-banner.privacy-pos-bottom-left .privacy-banner-actions,
.privacy-consent-banner.privacy-pos-bottom_left .privacy-banner-actions,
.privacy-consent-banner.privacy-pos-bottom-right .privacy-banner-actions,
.privacy-consent-banner.privacy-pos-bottom_right .privacy-banner-actions,
.privacy-consent-banner.privacy-pos-modal .privacy-banner-actions {
    width: 100%;
    justify-content: stretch;
}

.privacy-consent-banner.privacy-pos-bottom-left .privacy-btn,
.privacy-consent-banner.privacy-pos-bottom_left .privacy-btn,
.privacy-consent-banner.privacy-pos-bottom-right .privacy-btn,
.privacy-consent-banner.privacy-pos-bottom_right .privacy-btn,
.privacy-consent-banner.privacy-pos-modal .privacy-btn {
    flex: 1 1 auto;
    text-align: center;
}

.privacy-banner-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.privacy-banner-icon-wrap .icons,
.privacy-banner-icon-wrap svg {
    color: #3b82f6 !important;
    fill: currentColor;
    stroke: currentColor;
}

.privacy-banner-title,
#privacyConsentBanner .privacy-banner-title,
body:not(.dark-mode) #privacyConsentBanner .privacy-banner-title,
body.dark-mode #privacyConsentBanner .privacy-banner-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff !important;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.privacy-banner-text,
#privacyConsentBanner .privacy-banner-text,
#privacyConsentBanner p,
body:not(.dark-mode) #privacyConsentBanner .privacy-banner-text,
body:not(.dark-mode) #privacyConsentBanner p,
body.dark-mode #privacyConsentBanner .privacy-banner-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: #cbd5e1 !important;
    margin-bottom: 0;
}

.privacy-banner-text strong,
.privacy-banner-text b,
#privacyConsentBanner strong,
#privacyConsentBanner b {
    color: #ffffff !important;
}

.privacy-banner-text a,
#privacyConsentBanner .privacy-banner-text a,
body:not(.dark-mode) #privacyConsentBanner .privacy-banner-text a,
body.dark-mode #privacyConsentBanner .privacy-banner-text a {
    color: #60a5fa !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s;
}

.privacy-banner-text a:hover,
#privacyConsentBanner .privacy-banner-text a:hover,
body:not(.dark-mode) #privacyConsentBanner .privacy-banner-text a:hover,
body.dark-mode #privacyConsentBanner .privacy-banner-text a:hover {
    color: #93c5fd !important;
}

.privacy-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.privacy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    outline: none;
    white-space: nowrap;
}

.privacy-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

.privacy-btn-primary,
#privacyConsentBanner .privacy-btn-primary,
body:not(.dark-mode) #privacyConsentBanner .privacy-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
    border: none !important;
}

.privacy-btn-primary span,
.privacy-btn-primary svg,
.privacy-btn-primary .icons {
    color: #ffffff !important;
}

.privacy-btn-primary:hover,
#privacyConsentBanner .privacy-btn-primary:hover,
body:not(.dark-mode) #privacyConsentBanner .privacy-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45) !important;
    color: #ffffff !important;
}

.privacy-btn-secondary,
#privacyConsentBanner .privacy-btn-secondary,
body:not(.dark-mode) #privacyConsentBanner .privacy-btn-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

.privacy-btn-secondary span {
    color: inherit !important;
}

.privacy-btn-secondary:hover,
#privacyConsentBanner .privacy-btn-secondary:hover,
body:not(.dark-mode) #privacyConsentBanner .privacy-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    transform: translateY(-1px);
}

.privacy-btn-outline,
#privacyConsentBanner .privacy-btn-outline,
body:not(.dark-mode) #privacyConsentBanner .privacy-btn-outline {
    background: transparent !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

.privacy-btn-outline span,
.privacy-btn-outline svg,
.privacy-btn-outline .icons {
    color: inherit !important;
}

.privacy-btn-outline:hover,
#privacyConsentBanner .privacy-btn-outline:hover,
body:not(.dark-mode) #privacyConsentBanner .privacy-btn-outline:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    transform: translateY(-1px);
}

.privacy-btn-outline:hover span,
.privacy-btn-outline:hover svg,
.privacy-btn-outline:hover .icons {
    color: #ffffff !important;
}

/* ----------------------------------------------------
   2. Floating Preferences Trigger Widget
   ---------------------------------------------------- */
.privacy-floating-trigger {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999990;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #f8fafc;
    border-radius: 50px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.privacy-floating-trigger:hover {
    transform: translateY(-2px) scale(1.02);
    background: #1e293b;
    border-color: rgba(96, 165, 250, 0.5);
    color: #ffffff;
    box-shadow: 0 14px 30px -5px rgba(37, 99, 235, 0.35);
}

/* ----------------------------------------------------
   3. Preferences Customization Modal
   ---------------------------------------------------- */
#privacyPreferencesModal .modal-content {
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25);
    background: #ffffff;
    overflow: hidden;
}

#privacyPreferencesModal .modal-header {
    padding: 24px 28px 12px 28px;
    border-bottom: none;
}

#privacyPreferencesModal .modal-title,
body:not(.dark-mode) #privacyPreferencesModal .modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a !important;
    letter-spacing: -0.01em;
}

#privacyPreferencesModal .modal-header p,
#privacyPreferencesModal .modal-header .text-gray-500,
body:not(.dark-mode) #privacyPreferencesModal .modal-header p,
body:not(.dark-mode) #privacyPreferencesModal .modal-header .text-gray-500 {
    color: #64748b !important;
}

#privacyPreferencesModal .modal-header .close,
body:not(.dark-mode) #privacyPreferencesModal .modal-header .close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9 !important;
    color: #64748b !important;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: all 0.2s ease;
    border: none;
}

#privacyPreferencesModal .modal-header .close:hover,
body:not(.dark-mode) #privacyPreferencesModal .modal-header .close:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    transform: scale(1.05);
}

#privacyPreferencesModal .modal-body {
    padding: 16px 28px 20px 28px;
    max-height: 65vh;
    overflow-y: auto;
}

/* Custom Scrollbar for Modal */
#privacyPreferencesModal .modal-body::-webkit-scrollbar {
    width: 6px;
}
#privacyPreferencesModal .modal-body::-webkit-scrollbar-track {
    background: #f8fafc;
}
#privacyPreferencesModal .modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.privacy-category-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.privacy-category-card:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.privacy-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.privacy-category-title,
body:not(.dark-mode) .privacy-category-title,
body:not(.dark-mode) #privacyPreferencesModal h6 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a !important;
    margin-bottom: 0;
}

.privacy-category-badge,
body:not(.dark-mode) .privacy-category-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    display: inline-block;
    margin-left: 8px;
    border: 1px solid rgba(29, 78, 216, 0.2) !important;
}

.privacy-category-desc,
body:not(.dark-mode) .privacy-category-desc,
body:not(.dark-mode) #privacyPreferencesModal p.privacy-category-desc {
    font-size: 13px;
    line-height: 1.55;
    color: #64748b !important;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ----------------------------------------------------
   4. Custom iOS Style Toggle Switch
   ---------------------------------------------------- */
.privacy-ios-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.privacy-ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.privacy-ios-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 30px;
}

.privacy-ios-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.privacy-ios-switch input:checked + .privacy-ios-slider {
    background-color: #3b82f6;
}

.privacy-ios-switch input:checked + .privacy-ios-slider:before {
    transform: translateX(22px);
}

.privacy-ios-switch input:disabled + .privacy-ios-slider {
    background-color: #3b82f6;
    opacity: 0.65;
    cursor: not-allowed;
}

#privacyPreferencesModal .modal-footer {
    padding: 16px 28px 24px 28px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#privacyPreferencesModal .modal-footer .js-privacy-reject-all,
body:not(.dark-mode) #privacyPreferencesModal .modal-footer .js-privacy-reject-all {
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    transition: color 0.2s ease;
}

#privacyPreferencesModal .modal-footer .js-privacy-reject-all:hover,
body:not(.dark-mode) #privacyPreferencesModal .modal-footer .js-privacy-reject-all:hover {
    color: #0f172a !important;
}

#privacyPreferencesModal .modal-footer .btn-outline-primary,
body:not(.dark-mode) #privacyPreferencesModal .modal-footer .btn-outline-primary {
    background: transparent !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #334155 !important;
    border-radius: 12px !important;
    transition: all 0.2s ease;
}

#privacyPreferencesModal .modal-footer .btn-outline-primary:hover,
body:not(.dark-mode) #privacyPreferencesModal .modal-footer .btn-outline-primary:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

#privacyPreferencesModal .modal-footer .btn-primary,
body:not(.dark-mode) #privacyPreferencesModal .modal-footer .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    transition: all 0.2s ease;
}

#privacyPreferencesModal .modal-footer .btn-primary:hover,
body:not(.dark-mode) #privacyPreferencesModal .modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45) !important;
    color: #ffffff !important;
}

/* ----------------------------------------------------
   5. Mobile Responsiveness (Mobile First)
   ---------------------------------------------------- */
@media (max-width: 768px) {
    .privacy-consent-banner,
    .privacy-consent-banner.privacy-pos-bottom-center,
    .privacy-consent-banner.privacy-pos-bottom_center,
    .privacy-consent-banner.privacy-pos-bottom-left,
    .privacy-consent-banner.privacy-pos-bottom_left,
    .privacy-consent-banner.privacy-pos-bottom-right,
    .privacy-consent-banner.privacy-pos-bottom_right,
    .privacy-consent-banner.privacy-pos-modal {
        bottom: 12px !important;
        left: 12px !important;
        right: 12px !important;
        top: auto !important;
        transform: none !important;
        max-width: 100% !important;
        width: auto !important;
        padding: 16px 18px !important;
        border-radius: 18px !important;
    }

    .privacy-consent-banner .privacy-banner-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
    }

    .privacy-banner-actions {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .privacy-banner-actions .privacy-btn {
        width: 100% !important;
        text-align: center !important;
        padding: 11px 16px !important;
    }

    #privacyPreferencesModal .modal-footer {
        flex-direction: column-reverse;
        gap: 10px;
        padding: 16px 20px 20px 20px;
    }

    #privacyPreferencesModal .modal-footer > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

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

    .privacy-floating-trigger {
        bottom: 16px;
        left: 16px;
        padding: 7px 14px;
        font-size: 12px;
    }
}

/* ----------------------------------------------------
   6. Modal Stacking Context & Backdrop Fix
   ---------------------------------------------------- */
#privacyPreferencesModal, #erasureRequestModal {
    z-index: 1055 !important;
}

body.modal-open .modal-backdrop {
    z-index: 1050 !important;
}

/* ----------------------------------------------------
   7. Dark Mode Support (Design_1 & System-wide)
   ---------------------------------------------------- */
/* Backdrop darkening in dark mode */
.dark-mode .modal-backdrop.show,
body.dark-mode .modal-backdrop.show {
    opacity: 0.8 !important;
    background-color: #030712 !important;
}

/* --- Modal 1: Cookie & Privacy Preferences (#privacyPreferencesModal) --- */
.dark-mode #privacyPreferencesModal .modal-content,
body.dark-mode #privacyPreferencesModal .modal-content {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    border-radius: 24px !important;
}

.dark-mode #privacyPreferencesModal .modal-header,
body.dark-mode #privacyPreferencesModal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
}

.dark-mode #privacyPreferencesModal .modal-title,
body.dark-mode #privacyPreferencesModal .modal-title {
    color: #ffffff !important;
}

.dark-mode #privacyPreferencesModal .modal-header p,
body.dark-mode #privacyPreferencesModal .modal-header p,
.dark-mode #privacyPreferencesModal .modal-header .text-gray-500,
body.dark-mode #privacyPreferencesModal .modal-header .text-gray-500 {
    color: #94a3b8 !important;
}

.dark-mode #privacyPreferencesModal .modal-header .close,
body.dark-mode #privacyPreferencesModal .modal-header .close {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.2s ease !important;
}

.dark-mode #privacyPreferencesModal .modal-header .close:hover,
body.dark-mode #privacyPreferencesModal .modal-header .close:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    transform: scale(1.05);
}

/* Category cards inside preferences modal */
.dark-mode .privacy-category-card,
body.dark-mode .privacy-category-card {
    background: rgba(30, 41, 59, 0.65) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: none !important;
}

.dark-mode .privacy-category-card:hover,
body.dark-mode .privacy-category-card:hover {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}

.dark-mode .privacy-category-title,
body.dark-mode .privacy-category-title {
    color: #f8fafc !important;
}

.dark-mode .privacy-category-desc,
body.dark-mode .privacy-category-desc {
    color: #94a3b8 !important;
}

.dark-mode .privacy-category-badge,
body.dark-mode .privacy-category-badge {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
}

/* iOS Toggle Switches in dark mode */
.dark-mode .privacy-ios-slider,
body.dark-mode .privacy-ios-slider {
    background-color: #334155 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.dark-mode .privacy-ios-switch input:checked + .privacy-ios-slider,
body.dark-mode .privacy-ios-switch input:checked + .privacy-ios-slider {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4) !important;
}

.dark-mode .privacy-ios-switch input:disabled + .privacy-ios-slider,
body.dark-mode .privacy-ios-switch input:disabled + .privacy-ios-slider {
    background-color: #3b82f6 !important;
    opacity: 0.55 !important;
}

.dark-mode .privacy-ios-slider:before,
body.dark-mode .privacy-ios-slider:before {
    background-color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4) !important;
}

/* Custom Scrollbar in dark mode */
.dark-mode #privacyPreferencesModal .modal-body::-webkit-scrollbar-track,
body.dark-mode #privacyPreferencesModal .modal-body::-webkit-scrollbar-track {
    background: #0f172a !important;
}

.dark-mode #privacyPreferencesModal .modal-body::-webkit-scrollbar-thumb,
body.dark-mode #privacyPreferencesModal .modal-body::-webkit-scrollbar-thumb {
    background: #334155 !important;
}

.dark-mode #privacyPreferencesModal .modal-body::-webkit-scrollbar-thumb:hover,
body.dark-mode #privacyPreferencesModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #475569 !important;
}

/* Modal Footer */
.dark-mode #privacyPreferencesModal .modal-footer,
body.dark-mode #privacyPreferencesModal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #0f172a !important;
}

.dark-mode #privacyPreferencesModal .modal-footer .js-privacy-reject-all,
body.dark-mode #privacyPreferencesModal .modal-footer .js-privacy-reject-all {
    color: #94a3b8 !important;
}

.dark-mode #privacyPreferencesModal .modal-footer .js-privacy-reject-all:hover,
body.dark-mode #privacyPreferencesModal .modal-footer .js-privacy-reject-all:hover {
    color: #ffffff !important;
}

.dark-mode #privacyPreferencesModal .modal-footer .btn-outline-primary,
body.dark-mode #privacyPreferencesModal .modal-footer .btn-outline-primary {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f1f5f9 !important;
}

.dark-mode #privacyPreferencesModal .modal-footer .btn-outline-primary:hover,
body.dark-mode #privacyPreferencesModal .modal-footer .btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
}

.dark-mode #privacyPreferencesModal .modal-footer .btn-primary,
body.dark-mode #privacyPreferencesModal .modal-footer .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
    color: #ffffff !important;
}


/* --- Modal 2: Account Deletion & Anonymization (#erasureRequestModal) --- */
.dark-mode #erasureRequestModal .modal-content,
body.dark-mode #erasureRequestModal .modal-content {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    border-radius: 20px !important;
}

.dark-mode #erasureRequestModal .modal-header,
body.dark-mode #erasureRequestModal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-bottom: 16px !important;
    background: transparent !important;
}

.dark-mode #erasureRequestModal .modal-title,
body.dark-mode #erasureRequestModal .modal-title {
    color: #f87171 !important;
}

.dark-mode #erasureRequestModal .close,
body.dark-mode #erasureRequestModal .close {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
}

.dark-mode #erasureRequestModal .close:hover,
body.dark-mode #erasureRequestModal .close:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    transform: scale(1.05);
}

/* Alert warning banner inside erasure modal */
.dark-mode #erasureRequestModal .alert-warning,
body.dark-mode #erasureRequestModal .alert-warning {
    background: rgba(245, 158, 11, 0.12) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #fbbf24 !important;
    border-radius: 12px !important;
}

.dark-mode #erasureRequestModal .alert-warning strong,
body.dark-mode #erasureRequestModal .alert-warning strong {
    color: #fcd34d !important;
}

/* Form group & label */
.dark-mode #erasureRequestModal label,
body.dark-mode #erasureRequestModal label,
.dark-mode #erasureRequestModal .text-dark-blue,
body.dark-mode #erasureRequestModal .text-dark-blue {
    color: #cbd5e1 !important;
}

.dark-mode #erasureRequestModal textarea.form-control,
body.dark-mode #erasureRequestModal textarea.form-control {
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
    border-radius: 12px !important;
}

.dark-mode #erasureRequestModal textarea.form-control::placeholder,
body.dark-mode #erasureRequestModal textarea.form-control::placeholder {
    color: #64748b !important;
}

.dark-mode #erasureRequestModal textarea.form-control:focus,
body.dark-mode #erasureRequestModal textarea.form-control:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

/* Checkbox & label in dark mode */
.dark-mode #erasureRequestModal .custom-control__label,
body.dark-mode #erasureRequestModal .custom-control__label,
.dark-mode #erasureRequestModal .custom-control-label,
body.dark-mode #erasureRequestModal .custom-control-label {
    color: #cbd5e1 !important;
}

.dark-mode #erasureRequestModal .custom-checkbox .custom-control__label:before,
body.dark-mode #erasureRequestModal .custom-checkbox .custom-control__label:before {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.dark-mode #erasureRequestModal .custom-checkbox .custom-control-input:checked ~ .custom-control__label:before,
body.dark-mode #erasureRequestModal .custom-checkbox .custom-control-input:checked ~ .custom-control__label:before {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
}

.dark-mode #erasureRequestModal .close span,
body.dark-mode #erasureRequestModal .close span {
    line-height: 1 !important;
    font-size: 20px !important;
    color: #cbd5e1 !important;
}

.dark-mode #erasureRequestModal .close:hover span,
body.dark-mode #erasureRequestModal .close:hover span {
    color: #ffffff !important;
}

/* Erasure modal footer */
.dark-mode #erasureRequestModal .modal-footer,
body.dark-mode #erasureRequestModal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-top: 16px !important;
    background: transparent !important;
}

.dark-mode #erasureRequestModal .btn-transparent,
body.dark-mode #erasureRequestModal .btn-transparent {
    color: #94a3b8 !important;
}

.dark-mode #erasureRequestModal .btn-transparent:hover,
body.dark-mode #erasureRequestModal .btn-transparent:hover {
    color: #ffffff !important;
}

.dark-mode #erasureRequestModal .btn-danger,
body.dark-mode #erasureRequestModal .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4) !important;
    color: #ffffff !important;
}

.dark-mode #erasureRequestModal .btn-danger:hover,
body.dark-mode #erasureRequestModal .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.5) !important;
}


/* --- Panel Privacy Settings Tab Cards --- */
.dark-mode .privacy-panel-card,
body.dark-mode .privacy-panel-card {
    background: rgba(18, 24, 40, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
}

.dark-mode .privacy-panel-card h5,
.dark-mode .privacy-panel-card h6,
.dark-mode .privacy-panel-card .text-dark-blue,
body.dark-mode .privacy-panel-card h5,
body.dark-mode .privacy-panel-card h6,
body.dark-mode .privacy-panel-card .text-dark-blue {
    color: #ffffff !important;
}

.dark-mode .privacy-panel-card p,
.dark-mode .privacy-panel-card .text-gray-500,
body.dark-mode .privacy-panel-card p,
body.dark-mode .privacy-panel-card .text-gray-500 {
    color: #94a3b8 !important;
}

.dark-mode .privacy-panel-card .bg-primary-10,
body.dark-mode .privacy-panel-card .bg-primary-10 {
    background: rgba(59, 130, 246, 0.15) !important;
}

.dark-mode .privacy-panel-card .bg-danger-10,
body.dark-mode .privacy-panel-card .bg-danger-10 {
    background: rgba(239, 68, 68, 0.15) !important;
}

.dark-mode .privacy-panel-card .btn-outline-danger,
body.dark-mode .privacy-panel-card .btn-outline-danger {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}

.dark-mode .privacy-panel-card .btn-outline-danger:hover,
body.dark-mode .privacy-panel-card .btn-outline-danger:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.dark-mode .privacy-panel-card .btn-outline-primary,
body.dark-mode .privacy-panel-card .btn-outline-primary {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #60a5fa !important;
}

.dark-mode .privacy-panel-card .btn-outline-primary:hover,
body.dark-mode .privacy-panel-card .btn-outline-primary:hover {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}
