/* StormHelpLine.com Custom Styles */

/* Color Palette based on your logo */
:root {
    --primary-blue: #0d6efd;
    --secondary-teal: #20c997;
    --accent-green: #90c695;
    --dark-blue: #1e3a8a;
    --warning-yellow: #ffc107;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    
    /* Theme-aware colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #444444;
    --card-bg: #2d2d2d;
}

/* Dark Mode Specific Fixes for Storm Damage Page */
[data-theme="dark"] .bg-warning h2.display-5 {
    color: #ffffff !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
}

[data-theme="dark"] .bg-warning .lead {
    color: #ffffff !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
    opacity: 1 !important;
}

[data-theme="dark"] .bg-warning p {
    color: #ffffff !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
    opacity: 1 !important;
}

/* Force solid white for specific text in dark mode */
[data-theme="dark"] .bg-warning .text-center p,
[data-theme="dark"] .bg-warning .text-center .lead,
[data-theme="dark"] .bg-warning p.lead,
[data-theme="dark"] section.bg-warning p,
[data-theme="dark"] section.bg-warning .lead {
    color: #ffffff !important;
    background: none !important;
    background-image: none !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
    opacity: 1 !important;
    filter: none !important;
}

/* Typography - Fix white text on white backgrounds */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 600;
}

.text-dark-override {
    color: var(--text-dark) !important;
}

.text-primary-override {
    color: var(--primary-blue) !important;
}

/* Navigation improvements */
.navbar-brand img {
    height: 120px;
    width: auto;
    max-width: 400px;
}

.navbar {
    padding-top: 2rem;
    padding-bottom: 2rem;
    min-height: 160px;
}

/* Hero section improvements */
.hero {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%) !important;
    color: var(--white) !important;
    min-height: 80vh;
}

.hero h1, .hero p, .hero small, .hero .text-white {
    color: var(--white) !important;
}

.hero .text-light {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Card improvements - ensure text is readable */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-title {
    color: var(--text-dark);
    font-weight: 600;
}

.card-text {
    color: var(--text-muted);
}

/* Dashboard layouts - center aligned */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Admin dashboard improvements */
.border-left-primary {
    border-left: 4px solid var(--primary-blue) !important;
}

.border-left-success {
    border-left: 4px solid var(--secondary-teal) !important;
}

.border-left-warning {
    border-left: 4px solid var(--warning-yellow) !important;
}

.border-left-info {
    border-left: 4px solid var(--accent-green) !important;
}

/* Table improvements */
.table th {
    background-color: var(--dark-blue);
    color: var(--white);
    border: none;
    font-weight: 600;
}

.table-dark th {
    background-color: var(--dark-blue);
    border-color: var(--dark-blue);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Fix text contrast issues throughout */
.text-white-on-white-fix {
    color: var(--text-dark) !important;
}

.bg-white .text-white {
    color: var(--text-dark) !important;
}

/* Button improvements */
.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background-color: var(--dark-blue);
    border-color: var(--dark-blue);
}

.btn-success {
    background-color: var(--secondary-teal);
    border-color: var(--secondary-teal);
}

.btn-warning {
    background-color: var(--warning-yellow);
    border-color: var(--warning-yellow);
    color: var(--text-dark);
}

/* Form improvements */
.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Status badges */
.badge.bg-success {
    background-color: var(--secondary-teal) !important;
}

.badge.bg-primary {
    background-color: var(--primary-blue) !important;
}

.badge.bg-warning {
    background-color: var(--warning-yellow) !important;
    color: var(--text-dark) !important;
}

/* Footer improvements */
.footer {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 3rem 0 2rem 0;
    margin-top: auto;
}

.footer h5 {
    color: var(--white);
    font-weight: 600;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer a:hover {
    color: var(--white);
}

/* Sidebar improvements */
.sidebar {
    background-color: var(--bg-light);
    border-right: 1px solid #dee2e6;
    min-height: calc(100vh - 56px);
}

.sidebar .nav-link {
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-blue);
}

.sidebar .nav-link.active {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* Statistics cards */
.text-xs {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.text-gray-800 {
    color: var(--text-dark) !important;
}

.text-gray-300 {
    color: var(--text-muted) !important;
}



/* Contractors CTA Section Distinction */
.contractors-cta {
    background-color: #198754 !important; /* Green in light mode */
    color: #ffffff !important;
}

[data-theme="dark"] .contractors-cta {
    background-color: #0d5e2d !important; /* Darker green in dark mode */
    color: #ffffff !important;
}

/* Ensure CTA section text remains bright white in dark mode */
[data-theme="dark"] .contractors-cta h2,
[data-theme="dark"] .contractors-cta p,
[data-theme="dark"] .contractors-cta .lead {
    color: #ffffff !important;
}

/* NUCLEAR OPTION: Force white text on service guarantees with maximum specificity */
section.bg-primary.text-white .service-guarantee,
section.bg-primary .service-guarantee,
.bg-primary .service-guarantee {
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

section.bg-primary.text-white .service-guarantee h4,
section.bg-primary .service-guarantee h4,
.bg-primary .service-guarantee h4,
section.bg-primary.text-white .service-guarantee p,
section.bg-primary .service-guarantee p,
.bg-primary .service-guarantee p,
section.bg-primary.text-white .service-guarantee i,
section.bg-primary .service-guarantee i,
.bg-primary .service-guarantee i,
section.bg-primary.text-white .service-guarantee .bi,
section.bg-primary .service-guarantee .bi,
.bg-primary .service-guarantee .bi {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
}

/* Force blue background to be darker for better contrast */
section.bg-primary,
section.bg-primary.text-white {
    background-color: #0056b3 !important;
    color: #ffffff !important;
}

section.bg-primary h2,
section.bg-primary .lead,
section.bg-primary.text-white h2,
section.bg-primary.text-white .lead {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
}

/* Ultra-specific override for any remaining issues */
.bg-primary.text-white .container .row .col-lg-3 .service-guarantee,
.bg-primary .container .row .col-lg-3 .service-guarantee {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

.bg-primary.text-white .container .row .col-lg-3 .service-guarantee *,
.bg-primary .container .row .col-lg-3 .service-guarantee * {
    color: #ffffff !important;
}

/* CRITICAL FIX: Claims page dark mode - force solid white text */
[data-theme="dark"] .text-dark-custom,
[data-theme="dark"] .text-dark-custom span,
[data-theme="dark"] .claims-card .text-dark-custom,
[data-theme="dark"] .claims-card span.text-dark-custom {
    color: #ffffff !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Fix for all claim card text in dark mode */
[data-theme="dark"] .claims-card .card-body span,
[data-theme="dark"] .claims-card .card-body .fw-medium,
[data-theme="dark"] .claims-card .d-flex span {
    color: #ffffff !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* ==========================================================================
   UNIVERSAL CONTRAST ENFORCEMENT - OVERRIDES ALL OTHER CSS RULES
   ========================================================================== */

/* LIGHT BACKGROUNDS - FORCE BLACK TEXT (BOTH LIGHT AND DARK MODES) */
.bg-light, .bg-warning, .bg-white, .bg-info, .bg-secondary {
    color: #000000 !important;
}

.bg-light *, .bg-warning *, .bg-white *, .bg-info *, .bg-secondary * {
    color: #000000 !important;
}

.bg-light h1, .bg-light h2, .bg-light h3, .bg-light h4, .bg-light h5, .bg-light h6,
.bg-light p, .bg-light span, .bg-light small, .bg-light .lead, .bg-light i,
.bg-warning h1, .bg-warning h2, .bg-warning h3, .bg-warning h4, .bg-warning h5, .bg-warning h6,
.bg-warning p, .bg-warning span, .bg-warning small, .bg-warning .lead, .bg-warning i,
.bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4, .bg-white h5, .bg-white h6,
.bg-white p, .bg-white span, .bg-white small, .bg-white .lead, .bg-white i,
.bg-info h1, .bg-info h2, .bg-info h3, .bg-info h4, .bg-info h5, .bg-info h6,
.bg-info p, .bg-info span, .bg-info small, .bg-info .lead, .bg-info i,
.bg-secondary h1, .bg-secondary h2, .bg-secondary h3, .bg-secondary h4, .bg-secondary h5, .bg-secondary h6,
.bg-secondary p, .bg-secondary span, .bg-secondary small, .bg-secondary .lead, .bg-secondary i {
    color: #000000 !important;
}

/* DARK BACKGROUNDS - FORCE WHITE TEXT (BOTH LIGHT AND DARK MODES) */
.bg-dark, .bg-primary, .bg-success, .bg-danger {
    color: #ffffff !important;
}

.bg-dark *, .bg-primary *, .bg-success *, .bg-danger * {
    color: #ffffff !important;
}

.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6,
.bg-dark p, .bg-dark span, .bg-dark small, .bg-dark .lead, .bg-dark i,
.bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary h4, .bg-primary h5, .bg-primary h6,
.bg-primary p, .bg-primary span, .bg-primary small, .bg-primary .lead, .bg-primary i,
.bg-success h1, .bg-success h2, .bg-success h3, .bg-success h4, .bg-success h5, .bg-success h6,
.bg-success p, .bg-success span, .bg-success small, .bg-success .lead, .bg-success i,
.bg-danger h1, .bg-danger h2, .bg-danger h3, .bg-danger h4, .bg-danger h5, .bg-danger h6,
.bg-danger p, .bg-danger span, .bg-danger small, .bg-danger .lead, .bg-danger i {
    color: #ffffff !important;
}

/* THEME MODE OVERRIDES - MAINTAIN CONTRAST RULES IN BOTH MODES */
[data-theme="dark"] .bg-light, [data-theme="dark"] .bg-warning, 
[data-theme="dark"] .bg-white, [data-theme="dark"] .bg-info, 
[data-theme="dark"] .bg-secondary {
    color: #000000 !important;
}

[data-theme="dark"] .bg-light *, [data-theme="dark"] .bg-warning *, 
[data-theme="dark"] .bg-white *, [data-theme="dark"] .bg-info *, 
[data-theme="dark"] .bg-secondary * {
    color: #000000 !important;
}

[data-theme="dark"] .bg-dark, [data-theme="dark"] .bg-primary, 
[data-theme="dark"] .bg-success, [data-theme="dark"] .bg-danger {
    color: #ffffff !important;
}

[data-theme="dark"] .bg-dark *, [data-theme="dark"] .bg-primary *, 
[data-theme="dark"] .bg-success *, [data-theme="dark"] .bg-danger * {
    color: #ffffff !important;
}

/* OPACITY BACKGROUNDS - FORCE APPROPRIATE CONTRAST */
.bg-white.bg-opacity-10, .bg-white.bg-opacity-25, .bg-white.bg-opacity-50 {
    color: #ffffff !important;
}

.bg-white.bg-opacity-10 *, .bg-white.bg-opacity-25 *, .bg-white.bg-opacity-50 * {
    color: #ffffff !important;
}

/* MOBILE-SPECIFIC OVERRIDES */
@media (max-width: 768px) {
    .bg-light, .bg-warning, .bg-white, .bg-info, .bg-secondary {
        color: #000000 !important;
    }
    
    .bg-dark, .bg-primary, .bg-success, .bg-danger {
        color: #ffffff !important;
    }
}

/* ==========================================================================
   END UNIVERSAL CONTRAST ENFORCEMENT
   ========================================================================== */

/* Responsive improvements */
@media (max-width: 768px) {
    .navbar {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
        min-height: 140px;
    }
    
    .hero {
        min-height: 60vh;
    }
    
    .dashboard-container {
        padding: 0 10px;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding-top: 1rem;
        padding-bottom: 1rem;
        min-height: 120px;
    }
}