/* WhisperingFlame - Theme Consistency Overrides */
/* Force dark theme on ALL elements across the entire site */

/* CRITICAL: Override text-block white backgrounds */
.text-block,
.text-block.wide,
div.text-block,
.container .text-block {
    background-color: rgba(20, 20, 20, 0.85) !important;
    background: rgba(20, 20, 20, 0.85) !important;
    color: #f5f5f5 !important;
}

/* Override any white backgrounds from Bootstrap or inline styles */
.card,
.modal-content,
.dropdown-menu,
.popover,
.tooltip-inner,
.alert,
.list-group-item,
.jumbotron,
.well,
select.form-control,
select.form-select,
option {
    background-color: rgba(20, 20, 20, 0.85) !important;
    color: #f5f5f5 !important;
    border-color: rgba(220, 20, 60, 0.25) !important;
}

/* Dropdowns - ensure dark theme */
.dropdown-menu {
    background: #0f0f0f !important;
    border: 1px solid #8b0000 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

.dropdown-item {
    color: #f5f5f5 !important;
    background: transparent !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(220, 20, 60, 0.15) !important;
    color: #dc143c !important;
}

/* Modals */
.modal-header,
.modal-footer {
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(220, 20, 60, 0.2) !important;
}

.modal-body {
    background: rgba(20, 20, 20, 0.95) !important;
}

/* Alerts */
.alert {
    background: rgba(20, 20, 20, 0.85) !important;
    border: 1px solid rgba(220, 20, 60, 0.3) !important;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.14), rgba(0, 0, 0, 0.12)) !important;
    border-color: rgba(255, 165, 0, 0.6) !important;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.18), rgba(0, 0, 0, 0.12)) !important;
    border-color: rgba(220, 20, 60, 0.7) !important;
}

.alert-success {
    background: linear-gradient(135deg, rgba(93, 193, 185, 0.12), rgba(0, 0, 0, 0.12)) !important;
    border-color: rgba(93, 193, 185, 0.5) !important;
}

/* List groups */
.list-group-item {
    background: rgba(20, 20, 20, 0.85) !important;
    border-color: rgba(220, 20, 60, 0.2) !important;
}

.list-group-item:hover {
    background: rgba(220, 20, 60, 0.1) !important;
}

/* Select boxes and options */
select,
select.form-control,
select.form-select {
    background-color: #121212 !important;
    color: #f5f5f5 !important;
    border: 1px solid rgba(220, 20, 60, 0.45) !important;
}

select option {
    background-color: #0f0f0f !important;
    color: #f5f5f5 !important;
}

/* Popovers & Tooltips */
.popover {
    background: rgba(20, 20, 20, 0.98) !important;
    border: 1px solid rgba(220, 20, 60, 0.3) !important;
}

.popover-header {
    background: rgba(0, 0, 0, 0.4) !important;
    color: #dc143c !important;
}

.popover-body {
    color: #f5f5f5 !important;
}

.tooltip-inner {
    background: rgba(20, 20, 20, 0.95) !important;
}

/* Input groups */
.input-group-text {
    background-color: rgba(20, 20, 20, 0.85) !important;
    border: 1px solid rgba(220, 20, 60, 0.45) !important;
    color: #f5f5f5 !important;
}

/* Progress bars */
.progress {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

/* Badges */
.badge {
    background: linear-gradient(135deg, #dc143c, #c72c41) !important;
}

/* Breadcrumbs */
.breadcrumb {
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(220, 20, 60, 0.2) !important;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: #f5f5f5 !important;
}

.breadcrumb-item.active {
    color: #dc143c !important;
}

/* Nav pills & tabs */
.nav-pills .nav-link,
.nav-tabs .nav-link {
    background: rgba(20, 20, 20, 0.7) !important;
    color: #f5f5f5 !important;
    border-color: rgba(220, 20, 60, 0.2) !important;
}

.nav-pills .nav-link.active,
.nav-tabs .nav-link.active {
    background: rgba(220, 20, 60, 0.3) !important;
    color: #dc143c !important;
}

/* Accordion */
.accordion-item {
    background: rgba(20, 20, 20, 0.85) !important;
    border-color: rgba(220, 20, 60, 0.2) !important;
}

.accordion-button {
    background: rgba(0, 0, 0, 0.4) !important;
    color: #f5f5f5 !important;
}

.accordion-button:not(.collapsed) {
    background: rgba(220, 20, 60, 0.2) !important;
    color: #dc143c !important;
}

/* Pagination */
.page-item .page-link {
    background: rgba(20, 20, 20, 0.7) !important;
    border-color: rgba(220, 20, 60, 0.2) !important;
    color: #f5f5f5 !important;
}

.page-item.active .page-link {
    background: #dc143c !important;
    border-color: #dc143c !important;
    color: #000 !important;
}

.page-item:hover .page-link {
    background: rgba(220, 20, 60, 0.2) !important;
    color: #dc143c !important;
}

/* Offcanvas */
.offcanvas {
    background: rgba(15, 15, 15, 0.98) !important;
    color: #f5f5f5 !important;
}

.offcanvas-header {
    border-bottom: 1px solid rgba(220, 20, 60, 0.2) !important;
}

/* Any remaining white backgrounds */
.bg-white,
.bg-light {
    background-color: rgba(20, 20, 20, 0.85) !important;
}

/* Text colors for consistency */
.text-dark {
    color: #f5f5f5 !important;
}

.text-black-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Ensure all text on dark backgrounds is readable */
body * {
    text-shadow: none !important;
}

/* Fix any white text blocks */
div[style*="background:#fff"],
div[style*="background: #fff"],
div[style*="background:white"],
div[style*="background: white"] {
    background: rgba(20, 20, 20, 0.85) !important;
}