/* =========================================================
   DARK THEME (webfront)
   Applies only under <html data-theme="dark"> (set by the header's theme
   button / ThemeScript). Loaded after every other stylesheet; the original
   CSS uses many !important rules, so overrides here do too.

   Palette: deep emerald backgrounds, cream text, rose-gold accents. The
   leather / emerald sections (header, footer, hero banners, news, legal,
   videos, location cards) are already dark and are left as they are.

   Note: --cream is NOT remapped: the original CSS uses it ~110 times as the
   TEXT colour on dark sections. Only background and body-text variables are.
   ========================================================= */

html[data-theme="dark"] {
  --dk-bg: #0a1d16;          /* page */
  --dk-bg-alt: #0d231b;      /* alternate sections */
  --dk-surface: #122d23;     /* cards, panels */
  --dk-surface-2: #173729;   /* raised / inputs / badges */
  --dk-line: rgba(232, 180, 168, 0.28);
  --dk-line-soft: rgba(243, 236, 218, 0.1);
  --dk-text: #e6ece8;
  --dk-text-soft: #b7c6be;
  --dk-head: #f3ecda;
  --dk-accent: #e8b4a8;
  --dk-on-accent: #08362a;   /* text on rose-gold buttons and pills */

  /* Site variables used for backgrounds / body text (styles2b9f.css :root) */
  --bg: var(--dk-bg);
  --bg-alt: var(--dk-bg-alt);
  --surface: var(--dk-surface);
  --charcoal: var(--dk-text);
  --ink: var(--dk-text);
  --ink-soft: var(--dk-text-soft);
  --line: var(--dk-line-soft);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 40px -18px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
  /* Other stylesheets' background variables */
  --cream-bg: var(--dk-bg);
  --cream-alt: var(--dk-bg-alt);
  --pds-cream-bg: var(--dk-bg);
  --pds-cream-alt: var(--dk-bg-alt);
  /* About → figures panel */
  --stats-ink: var(--dk-head);
  --stats-soft: var(--dk-text-soft);

  color-scheme: dark;
  background-color: var(--dk-bg);
}

html[data-theme="dark"] body {
  background-color: var(--dk-bg) !important;
  color: var(--dk-text) !important;
}

/* Smooth switch between themes. */
html[data-theme] body {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* =========================================================
   SHARED: light sections, headings, text
   ========================================================= */

html[data-theme="dark"] .section-cream,
html[data-theme="dark"] .page-about .section-cream {
  background: var(--dk-bg) !important;
}

html[data-theme="dark"] .section-cream-alt,
html[data-theme="dark"] .page-about .section-cream-alt {
  background: var(--dk-bg-alt) !important;
}

html[data-theme="dark"] :is(.section-cream, .section-cream-alt) :is(h1, h2, h3, h4),
html[data-theme="dark"] .section-head h2 {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] :is(.section-cream, .section-cream-alt) :is(p, li),
html[data-theme="dark"] .lede,
html[data-theme="dark"] .page-about .section-head .lede {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] :is(.section-cream, .section-cream-alt) strong {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] .eyebrow {
  color: var(--dk-accent) !important;
}

/* Rose-gold buttons and pills keep dark text */
html[data-theme="dark"] :is(.btn-gold, .btn-gold span, .spot-tab.is-active) {
  color: var(--dk-on-accent) !important;
}

/* =========================================================
   CONTENT CARDS (About, Green City SEZ pages, How to Buy)
   ========================================================= */

html[data-theme="dark"] :is(.gc-block, .gc-notice, .gc-compare-card, .gc-aim, .gc-point-row, .gc-check li) {
  background: var(--dk-surface) !important;
  border-color: var(--dk-line) !important;
  color: var(--dk-text) !important;
}

html[data-theme="dark"] .gc-block:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] :is(.gc-block-num, .gc-point-ico, .gcs-detail-icon) {
  background: var(--dk-surface-2) !important;
  border-color: var(--dk-line) !important;
  color: var(--dk-accent) !important;
}

html[data-theme="dark"] :is(.gc-point-txt, .gc-point-txt span, .gc-aim span) {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] .gc-point-txt strong {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] .gc-check li {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] .gc-tm {
  background: rgba(232, 180, 168, 0.08) !important;
  color: var(--dk-head) !important;
}

html[data-theme="dark"] .gc-compare-card .val {
  color: var(--dk-head) !important;
}

/* Dark legal accordion keeps its own (already dark) look */
html[data-theme="dark"] .section-leather .gc-point-row {
  background: rgba(5, 30, 22, 0.55) !important;
}

/* About → profile section */
html[data-theme="dark"] .gc-avnish-section {
  background: var(--dk-bg) !important;
}

/* About → profile card */
html[data-theme="dark"] .gc-avnish-card {
  background: var(--dk-surface) !important;
  border-color: var(--dk-line) !important;
}

html[data-theme="dark"] .gc-avnish-card :is(p, .gc-avnish-role) {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] .gc-avnish-card :is(h2, strong, .gc-avnish-title) {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] .gc-avnish-quote {
  background: var(--dk-surface-2) !important;
}

/* About → figures panel (defines its own colour variables, so override them here) */
html[data-theme="dark"] .gc-figs {
  --stats-ink: var(--dk-head);
  --stats-soft: var(--dk-text-soft);
  --stats-rose-light: rgba(232, 180, 168, 0.16);
  background: var(--dk-bg-alt) !important;
}

html[data-theme="dark"] :is(.gc-figs-card, .gc-figs-panel) {
  background: var(--dk-surface) !important;
  border-color: var(--dk-line) !important;
}

html[data-theme="dark"] .gc-figs-panel-title {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] .gc-figs-ico {
  background: var(--dk-surface-2) !important;
  color: var(--dk-accent) !important;
}

html[data-theme="dark"] .gc-figs-bar {
  background: rgba(243, 236, 218, 0.1) !important;
}

/* =========================================================
   HOME
   ========================================================= */

html[data-theme="dark"] .gcs-all-stack {
  background: var(--dk-bg-alt) !important;
}

html[data-theme="dark"] .gcs-story-content .disc-btn-green {
  color: var(--dk-accent) !important;
  border-color: var(--dk-line) !important;
}

html[data-theme="dark"] :is(.gcs-story-card, .gcs-story-content) {
  background: var(--dk-surface) !important;
  border-color: var(--dk-line) !important;
}

html[data-theme="dark"] .gcs-story-content h3,
html[data-theme="dark"] .gcs-detail-point strong {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] .gcs-detail-point > div > span {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] .faq-item {
  background: var(--dk-surface) !important;
  border-color: var(--dk-line) !important;
}

html[data-theme="dark"] .faq-item summary {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] .faq-answer :is(p, li) {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] .spot-tab:not(.is-active) {
  color: var(--dk-text) !important;
}

html[data-theme="dark"] .gcfi-filter-btn:not(.active) {
  background: var(--dk-surface) !important;
  color: var(--dk-text) !important;
}

/* =========================================================
   HOW TO BUY
   ========================================================= */

html[data-theme="dark"] :is(.bg-note, .notice-box, .bg-az) {
  background: var(--dk-surface) !important;
  border-color: var(--dk-line) !important;
  color: var(--dk-text) !important;
}

html[data-theme="dark"] :is(.bg-note, .notice-box) :is(p, span) {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] .bg-jump {
  color: var(--dk-text) !important;
}

/* Directory letter groups: keep each group's tint, on a dark card */
html[data-theme="dark"] .bg-group {
  background: var(--dk-surface) !important;
  --tone-bg: rgba(232, 180, 168, 0.06);
  --tone-line: rgba(232, 180, 168, 0.3);
}

html[data-theme="dark"] .bg-card {
  background: var(--dk-surface-2) !important;
  border-color: var(--dk-line) !important;
}

html[data-theme="dark"] .bg-name {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] .bg-num {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] .bg-letter span {
  background: rgba(232, 180, 168, 0.18) !important;
  color: var(--dk-accent) !important;
}

/* =========================================================
   CONTACT
   ========================================================= */

html[data-theme="dark"] .gc-site-visit {
  background: var(--dk-bg) !important;
}

html[data-theme="dark"] .gc-contact-card {
  background: var(--dk-surface) !important;
  border-color: var(--dk-line) !important;
}

html[data-theme="dark"] .gc-contact-card h3 {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] .gc-contact-card p,
html[data-theme="dark"] .gc-contact-card-content a {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] .gc-form-field :is(input, textarea) {
  background: rgba(10, 29, 22, 0.85) !important;
  border-color: rgba(232, 180, 168, 0.4) !important;
  color: var(--dk-text) !important;
}

html[data-theme="dark"] .gc-form-field :is(input, textarea)::placeholder {
  color: rgba(230, 236, 232, 0.55) !important;
}

/* =========================================================
   VIDEOS
   ========================================================= */

html[data-theme="dark"] :is(.bgc-library-card__tag, .bgc-media-card__tag) {
  color: var(--dk-accent) !important;
}

html[data-theme="dark"] .bgc-swiper-btn {
  background: var(--dk-surface-2) !important;
  border-color: var(--dk-line) !important;
  color: var(--dk-accent) !important;
}

html[data-theme="dark"] .bgc-swiper-count strong,
html[data-theme="dark"] .bgc-media-card__number,
html[data-theme="dark"] :is(.bgc-view-more-btn, .bgc-view-more-btn span) {
  color: var(--dk-head) !important;
}

/* =========================================================
   LOCATION
   ========================================================= */

html[data-theme="dark"] .gcl-title-icon {
  background: var(--dk-surface-2) !important;
  color: var(--dk-accent) !important;
}

/* =========================================================
   BLOG LIST
   ========================================================= */

html[data-theme="dark"] .blog-entry {
  background: var(--dk-surface) !important;
  border-color: var(--dk-line) !important;
}

html[data-theme="dark"] .blog-entry :is(h2, h3) {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] .blog-entry p {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] :is(.blog-entry__meta, .blog-entry time) {
  color: var(--dk-accent) !important;
}

/* =========================================================
   BLOG ARTICLE
   ========================================================= */

html[data-theme="dark"] :is(.blog-article-card, .blog-side-card) {
  background: var(--dk-surface) !important;
  border-color: var(--dk-line) !important;
}

html[data-theme="dark"] .blog-article-card :is(h1, h2, h3, strong),
html[data-theme="dark"] .blog-side-card__head {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] .blog-article-card :is(p, li),
html[data-theme="dark"] :is(.blog-takeaways li, .blog-related-info span) {
  color: var(--dk-text-soft) !important;
}

/* Images and videos are never altered. */
html[data-theme="dark"] :is(img, video, iframe) {
  color-scheme: normal;
}

/* =========================================================
   ROUND 3 — headings & text that hard-code the deep green
   ========================================================= */

html[data-theme="dark"] :is(
  .page-location .gcl-section-head h2,
  .page-beyond .bgc-section-head h2,
  .bgc-section-head h2,
  .gc-contact-info-head h2,
  .blog-related-info strong,
  .blog-lead,
  .blog-quote
) {
  color: var(--dk-head) !important;
}

html[data-theme="dark"] :is(.gc-contact-info-head p, .gcfi-lede, .blog-share-label) {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] .gc-avnish-title span {
  color: var(--dk-text-soft) !important;
}

html[data-theme="dark"] .blog-quote {
  background: linear-gradient(135deg, rgba(232, 180, 168, 0.06) 0%, rgba(232, 180, 168, 0.12) 100%) !important;
}

html[data-theme="dark"] .blog-entry__more {
  color: var(--dk-accent) !important;
}

/* Disclaimer / tutorial buttons were drawn in the light surface colour */
html[data-theme="dark"] .disc-btn,
html[data-theme="dark"] .disc-btn-ico {
  color: var(--dk-text) !important;
  border-color: var(--dk-line) !important;
}

html[data-theme="dark"] .blog-side-card p {
  color: var(--dk-text-soft) !important;
}

/* Header round buttons (search, theme, social, call pill) and the floating
   call button stay cream like the EN/हिंदी pill — their icons are deep green. */
html[data-theme="dark"] :is(.header-cta .search-btn, .header-cta .head-social, .header-cta .header-phone, .fab-call) {
  background: #FFFDF7;
  color: #08362A;
}
html[data-theme="dark"] :is(.header-cta .search-btn, .header-cta .head-social, .header-cta .header-phone, .fab-call):hover {
  background: #e8b4a8;
  color: #125C46;
}

/* How to Buy → Document verification + video tutorial */
html[data-theme="dark"] :is(.htb-doc, .htb-video) {
  background: var(--dk-surface);
  border-color: var(--dk-line);
}

html[data-theme="dark"] :is(.htb-docs__head h2, .htb-doc__body h3, .htb-video__title) {
  color: var(--dk-head);
}

html[data-theme="dark"] .htb-docs__accent {
  color: var(--dk-accent);
}

html[data-theme="dark"] .htb-doc__num {
  background: var(--dk-surface-2);
  color: var(--dk-head);
}

html[data-theme="dark"] .htb-doc--rose .htb-doc__num,
html[data-theme="dark"] .htb-video__bar {
  background: var(--dk-accent);
  color: var(--dk-on-accent);
}

html[data-theme="dark"] .htb-video__rule {
  background: rgba(8, 54, 42, 0.5);
}

html[data-theme="dark"] .htb-video__btn {
  background: var(--dk-accent);
  color: var(--dk-on-accent);
}
