/* GLOBAL LIME BACKGROUND TEXT VISIBILITY FIX */
/* This ensures ALL text on #d3df37 backgrounds is black and visible */

/* Direct background color matches */
[style*="background:#d3df37"],
[style*="background: #d3df37"],
[style*="background-color:#d3df37"],
[style*="background-color: #d3df37"],
.bg-primary,
.btn-primary,
.badge-primary,
.alert-primary {
    color: #000000 !important;
}

/* All child elements inherit black text */
[style*="background:#d3df37"] *,
[style*="background: #d3df37"] *,
[style*="background-color:#d3df37"] *,
[style*="background-color: #d3df37"] *,
.bg-primary *,
.btn-primary *,
.badge-primary *,
.alert-primary * {
    color: #000000 !important;
}

/* Specific element types on lime backgrounds */
[style*="background:#d3df37"] h1,
[style*="background:#d3df37"] h2,
[style*="background:#d3df37"] h3,
[style*="background:#d3df37"] h4,
[style*="background:#d3df37"] h5,
[style*="background:#d3df37"] h6,
[style*="background:#d3df37"] p,
[style*="background:#d3df37"] span,
[style*="background:#d3df37"] div,
[style*="background:#d3df37"] a,
[style*="background:#d3df37"] i,
[style*="background:#d3df37"] small,
[style*="background: #d3df37"] h1,
[style*="background: #d3df37"] h2,
[style*="background: #d3df37"] h3,
[style*="background: #d3df37"] h4,
[style*="background: #d3df37"] h5,
[style*="background: #d3df37"] h6,
[style*="background: #d3df37"] p,
[style*="background: #d3df37"] span,
[style*="background: #d3df37"] div,
[style*="background: #d3df37"] a,
[style*="background: #d3df37"] i,
[style*="background: #d3df37"] small {
    color: #000000 !important;
}

/* Bootstrap primary classes */
.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 div,
.bg-primary a,
.bg-primary i,
.bg-primary small,
.btn-primary h1,
.btn-primary h2,
.btn-primary h3,
.btn-primary h4,
.btn-primary h5,
.btn-primary h6,
.btn-primary p,
.btn-primary span,
.btn-primary div,
.btn-primary a,
.btn-primary i,
.btn-primary small {
    color: #000000 !important;
}

/* Gradient backgrounds containing lime */
[style*="linear-gradient"][style*="#d3df37"] *,
[style*="radial-gradient"][style*="#d3df37"] *,
[style*="gradient"][style*="d3df37"] * {
    color: #000000 !important;
}

/* CSS custom property matches */
[style*="var(--tirupati-lime)"] *,
[style*="var(--brand-lime)"] *,
[style*="var(--primary-gold)"] * {
    color: #000000 !important;
}

/* Specific component fixes */
.elite-glass,
.elite-glass *,
.lime-badge,
.lime-badge *,
.primary-badge,
.primary-badge * {
    color: #000000 !important;
}

/* Button states */
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    color: #000000 !important;
}

.btn-primary:hover *,
.btn-primary:focus *,
.btn-primary:active *,
.btn-primary.active * {
    color: #000000 !important;
}

/* Form controls with lime backgrounds */
.form-control[style*="#d3df37"],
.form-select[style*="#d3df37"],
input[style*="#d3df37"],
select[style*="#d3df37"],
textarea[style*="#d3df37"] {
    color: #000000 !important;
}

/* Cards and containers */
.card[style*="#d3df37"] *,
.container[style*="#d3df37"] *,
.section[style*="#d3df37"] * {
    color: #000000 !important;
}

/* Navigation elements */
.nav-link[style*="#d3df37"],
.navbar[style*="#d3df37"] *,
.dropdown-menu[style*="#d3df37"] * {
    color: #000000 !important;
}

/* Table elements */
.table[style*="#d3df37"] *,
th[style*="#d3df37"],
td[style*="#d3df37"] {
    color: #000000 !important;
}

/* Modal elements */
.modal[style*="#d3df37"] *,
.modal-content[style*="#d3df37"] *,
.modal-body[style*="#d3df37"] * {
    color: #000000 !important;
}

/* Alert elements */
.alert[style*="#d3df37"] *,
.notification[style*="#d3df37"] * {
    color: #000000 !important;
}

/* Price calculator specific */
.price-calculator-page [style*="#d3df37"] *,
.calculator-step [style*="#d3df37"] *,
.price-summary [style*="#d3df37"] *,
.price-breakdown [style*="#d3df37"] *,
.price-item [style*="#d3df37"] * {
    color: #000000 !important;
}

/* All Bootstrap button variants with primary */
.btn-primary,
.btn-primary *,
.btn-outline-primary:checked,
.btn-outline-primary.active,
.btn-outline-primary:checked *,
.btn-outline-primary.active *,
.btn-check:checked + .btn-outline-primary,
.btn-check:checked + .btn-outline-primary * {
    color: #000000 !important;
}

/* All sections and containers */
section [style*="#d3df37"] *,
section .bg-primary *,
section .btn-primary *,
header [style*="#d3df37"] *,
header .bg-primary *,
footer [style*="#d3df37"] *,
footer .bg-primary *,
main [style*="#d3df37"] *,
main .bg-primary *,
article [style*="#d3df37"] *,
article .bg-primary *,
aside [style*="#d3df37"] *,
aside .bg-primary * {
    color: #000000 !important;
}

/* All possible CSS class combinations */
.bg-primary.text-white,
.bg-primary.text-white *,
.btn-primary.text-white,
.btn-primary.text-white *,
[class*="primary"][style*="#d3df37"],
[class*="primary"][style*="#d3df37"] *,
[class*="lime"][style*="#d3df37"],
[class*="lime"][style*="#d3df37"] * {
    color: #000000 !important;
}

/* Dynamic content and JavaScript generated elements */
[data-bs-theme] [style*="#d3df37"] *,
.dynamic-content [style*="#d3df37"] *,
.js-generated [style*="#d3df37"] *,
.ajax-content [style*="#d3df37"] * {
    color: #000000 !important;
}

/* All possible container types */
.container [style*="#d3df37"] *,
.container-fluid [style*="#d3df37"] *,
.row [style*="#d3df37"] *,
.col [style*="#d3df37"] *,
[class*="col-"] [style*="#d3df37"] * {
    color: #000000 !important;
}

/* Override any white text on lime */
[style*="background:#d3df37"][style*="color:white"] *,
[style*="background: #d3df37"][style*="color: white"] *,
[style*="background:#d3df37"] .text-white,
[style*="background: #d3df37"] .text-white {
    color: #000000 !important;
}

/* Ensure icons are also black */
[style*="background:#d3df37"] .fas,
[style*="background:#d3df37"] .far,
[style*="background:#d3df37"] .fab,
[style*="background: #d3df37"] .fas,
[style*="background: #d3df37"] .far,
[style*="background: #d3df37"] .fab,
.bg-primary .fas,
.bg-primary .far,
.bg-primary .fab,
.btn-primary .fas,
.btn-primary .far,
.btn-primary .fab {
    color: #000000 !important;
}

/* Pseudo-elements */
[style*="background:#d3df37"]::before,
[style*="background:#d3df37"]::after,
[style*="background: #d3df37"]::before,
[style*="background: #d3df37"]::after,
.bg-primary::before,
.bg-primary::after,
.btn-primary::before,
.btn-primary::after {
    color: #000000 !important;
}

/* Ensure readability on hover states */
[style*="background:#d3df37"]:hover *,
[style*="background: #d3df37"]:hover *,
.bg-primary:hover *,
.btn-primary:hover * {
    color: #000000 !important;
}

/* Force override any conflicting styles - ULTIMATE PRIORITY */
body [style*="background:#d3df37"] *,
body [style*="background: #d3df37"] *,
body .bg-primary *,
body .btn-primary *,
html [style*="background:#d3df37"] *,
html [style*="background: #d3df37"] *,
html .bg-primary *,
html .btn-primary * {
    color: #000000 !important;
}

/* Catch-all for any missed elements */
* [style*="#d3df37"] *,
* .bg-primary *,
* .btn-primary *,
*[style*="#d3df37"],
*.bg-primary,
*.btn-primary {
    color: #000000 !important;
}

/* Specific targeting for common patterns */
[style*="background-color: #d3df37"] *,
[style*="background-color:#d3df37"] *,
[style*="backgroundColor: #d3df37"] *,
[style*="backgroundColor:#d3df37"] *,
[style*="bg: #d3df37"] *,
[style*="bg:#d3df37"] * {
    color: #000000 !important;
}

/* CSS variables and computed styles */
[style*="var(--bs-primary)"] *,
[style*="var(--primary)"] *,
[style*="var(--lime)"] *,
[style*="rgb(211, 223, 55)"] *,
[style*="rgba(211, 223, 55"] * {
    color: #000000 !important;
}

/* PRICE CALCULATOR SPECIFIC FIXES */
/* Target the actual price calculator page */
body.price-calculator *[style*="#d3df37"],
body.price-calculator *.bg-primary,
body.price-calculator *.btn-primary,
.price-calculator-page *[style*="#d3df37"],
.price-calculator-page *.bg-primary,
.price-calculator-page *.btn-primary {
    color: #000000 !important;
}

/* Button check states in price calculator */
.btn-check:checked + .btn-outline-primary,
.btn-check:checked + .btn-outline-primary *,
.btn-check:active + .btn-outline-primary,
.btn-check:active + .btn-outline-primary * {
    color: #000000 !important;
    background-color: #d3df37 !important;
}

/* Override Bootstrap primary button colors globally */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    color: #000000 !important;
}

.btn-primary *,
.btn-primary:hover *,
.btn-primary:focus *,
.btn-primary:active *,
.btn-primary.active * {
    color: #000000 !important;
}

/* Success button fix */
.btn-success,
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active {
    color: #000000 !important;
}

.btn-success *,
.btn-success:hover *,
.btn-success:focus *,
.btn-success:active *,
.btn-success.active * {
    color: #000000 !important;
}