/* Platform-wide contrast guard for light UI surfaces. */

html[data-user-theme="light"] :is(
    .modal-content,
    .dropdown-menu,
    .offcanvas,
    .card,
    .list-group-item,
    .accordion-item,
    .toast,
    .popover,
    .swal2-popup,
    .table,
    .dp-card,
    .dp-panel
):not(.bg-dark):not(.text-bg-dark):not(.navbar-custom):not(.site-footer):not(.weather-modal-shell) :is(
    .text-muted,
    .text-secondary,
    .form-text,
    .help-text,
    .hint-text,
    .meta-text,
    .soft-muted
) {
    color: #52647a !important;
    opacity: 1 !important;
}

html[data-user-theme="light"] :is(
    .modal-content,
    .dropdown-menu,
    .offcanvas,
    .card,
    .list-group-item,
    .accordion-item,
    .toast,
    .popover,
    .swal2-popup,
    .table,
    .dp-card,
    .dp-panel
):not(.bg-dark):not(.text-bg-dark):not(.navbar-custom):not(.site-footer):not(.weather-modal-shell) :is(
    .text-light,
    .text-white
):not(.btn):not(.badge):not(.alert):not(.progress-bar):not(.text-bg-primary):not(.text-bg-secondary):not(.text-bg-success):not(.text-bg-danger):not(.text-bg-warning):not(.text-bg-info):not(.text-bg-dark) {
    color: #23313b !important;
}

html[data-user-theme="light"] :is(
    .modal-content,
    .dropdown-menu,
    .offcanvas,
    .card,
    .list-group-item,
    .accordion-item,
    .toast,
    .popover,
    .swal2-popup,
    .table,
    .dp-card,
    .dp-panel
):not(.bg-dark):not(.text-bg-dark):not(.navbar-custom):not(.site-footer):not(.weather-modal-shell) :is(
    .badge,
    .btn,
    .alert,
    .progress-bar,
    .text-bg-primary,
    .text-bg-secondary,
    .text-bg-success,
    .text-bg-danger,
    .text-bg-warning,
    .text-bg-info,
    .text-bg-dark
) :is(.text-light, .text-white) {
    color: inherit !important;
}
