/* Shrimad Astro — Dark mode overrides v2. Activated via data-theme="dark" on <html>. */
[data-theme="dark"] {
  --background: #17100a;
  --card-bg: #251a10;
  --text: #f3e5d0;
  --text-secondary: #c8a37e;
  --border: #4a3826;
  --header-bg: #7c4a18;
  --footer-bg: rgba(23, 16, 10, 0.96);
  --shadow: rgba(0, 0, 0, 0.35);
  --menu-bg: rgba(30, 20, 12, 0.97);
  --bg-dark: #33261a;
  --bg1: #20160d;
  color-scheme: dark;
}

/* Hardcoded light surfaces -> dark */
[data-theme="dark"] .fade-overlay {
  background: linear-gradient(to bottom, transparent, #17100a);
}
[data-theme="dark"] .tithi_content {
  background: #251a10;
}
[data-theme="dark"] .product_card {
  background: #251a10;
}
[data-theme="dark"] .ch-modal {
  background: #251a10;
}
[data-theme="dark"] .chandra-card {
  background: #251a10;
}
[data-theme="dark"] .ch_service_item:hover {
  background: #251a10;
}
[data-theme="dark"] .ch_service_image {
  background: #251a10;
}
[data-theme="dark"] .bsmodal_dialog {
  background: #251a10;
}
[data-theme="dark"] .zodiac-sign-detail {
  background: #251a10;
}
[data-theme="dark"] .eclipse-card {
  background: #251a10;
}
[data-theme="dark"] .astro-quote-block {
  background: #251a10;
}
[data-theme="dark"] .zodiac-card {
  background: #251a10;
}
[data-theme="dark"] .zodiac-image-box {
  background: #251a10;
}
[data-theme="dark"] .tabs_btn {
  background: #251a10;
  color: #f3e5d0;
  border-color: #4a3826;
}
[data-theme="dark"] .select_languages {
  background: #251a10;
  color: #f3e5d0;
  border-color: #4a3826;
}
[data-theme="dark"] .tc_card {
  background: #2e2114;
}
[data-theme="dark"] .hero-indicators {
  background-color: #17100a;
}
[data-theme="dark"] #goToTopBtn svg {
  background-color: #33261a;
}
[data-theme="dark"] .ft_social a {
  background: #33261a;
}
[data-theme="dark"] .ch_service_section {
  background: #17100a;
}
[data-theme="dark"] .tabs_section {
  background-color: #20160d;
}
[data-theme="dark"] .about {
  background: #20160d;
}
[data-theme="dark"] .services_box {
  background: #251a10;
}
[data-theme="dark"] .home_one {
  background: #251a10;
}
[data-theme="dark"] .finder-box .result-box {
  background: #251a10;
}
[data-theme="dark"] .category {
  background: #251a10;
}
[data-theme="dark"] .inner-links {
  background: #251a10;
}
[data-theme="dark"] .month-buttons button {
  background: #33261a;
  color: #f3e5d0;
}

/* Text contrast fixes for dark mode */
[data-theme="dark"] .ch_service_name {
  color: #f3e5d0;
}
[data-theme="dark"] .tc_card h3 {
  color: #f3e5d0;
}
[data-theme="dark"] .tc_card p {
  color: #c8a37e;
}
[data-theme="dark"] .is_content ul {
  color: #f3e5d0;
}
[data-theme="dark"] .save-img-btn:hover {
  background: #c8a37e;
}
[data-theme="dark"] .ch-close:hover {
  background: #33261a;
}

/* Theme toggle button (header) */
.theme-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 22px;
  padding: 8px;
  line-height: 1;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.theme-toggle-btn:hover {
  transform: scale(1.12);
}

/* v3: remaining homepage sections */
[data-theme="dark"] .ft_footer {
  background: #17100a;
}
[data-theme="dark"] .ZodiacSignsbox {
  background-color: #20160d;
}
[data-theme="dark"] .api-section {
  background-color: #20160d;
}
[data-theme="dark"] .api-section h2 {
  color: #f3e5d0;
}
[data-theme="dark"] .api-section p {
  color: #c8a37e;
}
[data-theme="dark"] .audio-section {
  color: #f3e5d0;
}
[data-theme="dark"] .hero-panchang {
  background-color: #2e2114;
}
/* white-backed tile icons -> rounded tiles */
[data-theme="dark"] .ch_service_image img {
  border-radius: 12px;
}

/* v7: icon tiles stay light in dark mode for visibility */
[data-theme="dark"] .ch_service_image {
  background: #FFF7E8;
}
[data-theme="dark"] .ch_service_image img {
  border-radius: 12px;
}

/* v5: glitch-hunt punch list fixes */
/* 1-3. Kundli form heading, labels, helper text */
[data-theme="dark"] .birth_form h2.mobile_h2 {
  color: #f3e5d0;
}
[data-theme="dark"] .birth_form .label {
  color: #f3e5d0;
}
[data-theme="dark"] .birth_form .small-text {
  color: #c8a37e;
}
[data-theme="dark"] .birth_form small {
  color: #c8a37e;
}
/* 4. Panchang table cells */
[data-theme="dark"] .hero-panchang table td {
  color: #f3e5d0;
}
[data-theme="dark"] .hero-panchang table th {
  color: #f3e5d0;
}
/* 5. Tab panel buttons */
[data-theme="dark"] .tc_btn {
  color: #f3e5d0;
}
/* 6. Zodiac names */
[data-theme="dark"] .zodiac-card h3 {
  color: #f3e5d0;
}
/* 7. Service-card white icon boxes */
[data-theme="dark"] .service-card img {
  background: #FFF7E8;
  border-radius: 12px;
}
/* 8. Footer headings */
[data-theme="dark"] .ft_box h3 {
  color: #f3e5d0;
}
/* 9. Tables across calculators */
[data-theme="dark"] .ch_table th {
  color: #f3e5d0;
}
[data-theme="dark"] .ch_table td {
  color: #e8d5b8;
}
/* 10. Shastra accordion hover */
[data-theme="dark"] .category button:hover {
  background: #33261a;
}
[data-theme="dark"] .category button {
  color: #f3e5d0;
}

/* v6: final text readability */
[data-theme="dark"] .hero-panchang h2 {
  color: #f3e5d0;
}
[data-theme="dark"] .birth_form .small {
  color: #c8a37e;
}
[data-theme="dark"] .textdata h2.mobile-h2 {
  color: #f3e5d0;
}
[data-theme="dark"] .textdata p {
  color: #c8a37e;
}

/* v8: tag badges ivory in dark mode */
[data-theme="dark"] .tc_tag {
  color: #FFFFF0;
}

/* v9: consultation card headings ivory */
[data-theme="dark"] .tc_card h2 {
  color: #FFFFF0;
}

/* v10: service card grid text ivory */
[data-theme="dark"] .card-grid h3 {
  color: #FFFFF0;
}
[data-theme="dark"] .card-grid p {
  color: #e8d5b8;
}

/* v11: WhatsApp promo modal dark mode */
[data-theme="dark"] .promo_box {
  background: linear-gradient(145deg, #2e2114, #251a10);
  color: #f3e5d0;
}
[data-theme="dark"] .promo_body {
  color: #c8a37e;
}
[data-theme="dark"] .promo_close {
  color: #c8a37e;
}

/* v12: WhatsApp branding */
/* Popup heading + button in WhatsApp green */
[data-theme="dark"] .promo_header {
  color: #25D366;
}
[data-theme="dark"] .promo_btn {
  background: #25D366;
  color: #fff;
}
[data-theme="dark"] .promo_btn:hover {
  background: #1da851;
}
/* Light mode too: WhatsApp green for popup */
.promo_header {
  color: #128C7E;
}
.promo_btn {
  background: #25D366;
}
.promo_btn:hover {
  background: #1da851;
}
/* Header WhatsApp button readable in dark mode */
[data-theme="dark"] .hero_btn {
  background-color: #25D366;
  color: #fff;
}
[data-theme="dark"] .hero_btn:hover {
  background-color: #1da851;
  color: #fff;
}

/* v13: language modal readability */
[data-theme="dark"] .ch-modal-title {
  color: #f3e5d0;
}
[data-theme="dark"] .ch-modal-body {
  color: #e8d5b8;
}
[data-theme="dark"] .ch-modal-body label {
  color: #f3e5d0;
}
[data-theme="dark"] .ch-modal-body select {
  background: #33261a;
  color: #f3e5d0;
  border-color: #4a3826;
}
[data-theme="dark"] .ch-close {
  color: #c8a37e;
}

/* v14: Kundli result output readable in dark mode */
[data-theme="dark"] .ch_results {
  color: #f3e5d0;
}
[data-theme="dark"] .ch_results p {
  color: #e8d5b8;
}
[data-theme="dark"] .ch_results td {
  color: #e8d5b8;
}
[data-theme="dark"] .ch_results th {
  color: #f3e5d0;
}
[data-theme="dark"] .ch_results .api_result {
  color: #e8d5b8;
}
[data-theme="dark"] .ch_results .box_heading {
  color: #f3e5d0;
}
[data-theme="dark"] .ch_results .text_paragraph1 {
  color: #e8d5b8;
}
[data-theme="dark"] .ch_results .text_paragraph2 {
  color: #e8d5b8;
}
[data-theme="dark"] .ch_results .info_box {
  color: #e8d5b8;
}

/* v15: birth details + planets tables - force readable text */
[data-theme="dark"] .ch_results table td:first-child {
  color: #f3e5d0;
}
[data-theme="dark"] .api_result table td:first-child {
  color: #f3e5d0;
}
[data-theme="dark"] .api_result .table thead th {
  color: #f3e5d0;
  background: #33261a;
}
[data-theme="dark"] .ch_results table tr td {
  color: #e8d5b8;
}
[data-theme="dark"] .ch_results table tr th {
  color: #f3e5d0;
}

/* v16: birth details labels - force light */
[data-theme="dark"] .ch_results table th {
  color: #f3e5d0 !important;
}
[data-theme="dark"] .ch_results table td {
  color: #e8d5b8 !important;
}

/* v17: broader result table selectors */
[data-theme="dark"] #chweb_result th {
  color: #f3e5d0 !important;
}
[data-theme="dark"] #chweb_result td {
  color: #e8d5b8 !important;
}
[data-theme="dark"] #chweb_result table thead th {
  color: #f3e5d0 !important;
}

/* v18: footer link contrast */
[data-theme="dark"] .ft_box a {
  color: #d8c9b0;
}

/* v19: eclipse cards */
[data-theme="dark"] .eclipse-card h2 {
  color: #FFFFF0;
}
[data-theme="dark"] .eclipse-info-row strong {
  color: #f3e5d0;
}
[data-theme="dark"] .eclipse-info-row.eclipse-hindi-text {
  color: #e8d5b8;
}

/* v20: chandra cards text */
[data-theme="dark"] .chandra-title {
  color: #FFFFF0;
}
[data-theme="dark"] .chandra-value {
  color: #e8d5b8;
}

/* v21: api result alert/info cards */
[data-theme="dark"] .api_result .alert {
  background: #2e2114;
  border-color: #4a3826;
  color: #f3e5d0;
}
[data-theme="dark"] .api_result .lead {
  color: #f3e5d0;
}
