/* ============================================================
   Per-site front-end themes (selected from admin panel).
   Applied ONLY when <body> has classes "themed theme-<key>".
   The default site has NO "themed" class => original design
   is completely untouched.

   All rules use "body.themed" + !important so they reliably
   override existing class-based rules AND inline styles,
   regardless of stylesheet load order.
   ============================================================ */

/* ---------- Theme palettes (just set variables) ---------- */
body.theme-red {
  --bg: #fff5f3;
  --bar: #c62828;
  --section: #b71c1c;
  --border: #c62828;
  --btn: #d32f2f;
  --navtext: #ffe082;
  --logo: #c62828;
  --text: #222222;
  /* result game cards */
  --card: #ffffff;
  --card-hi: #ffe0b2;
  --card-name: #c62828;
  --card-res: #b71c1c;
  --card-time: #8a1a1a;
}

body.theme-blue_yellow {
  --bg: #ffffff;
  --bar: #16277a;
  --section: #16277a;
  --border: #16277a;
  --btn: #e53935;
  --navtext: #ffd600;
  --logo: #16277a;
  --text: #222222;
  /* result game cards */
  --card: #ffffff;
  --card-hi: #fff59d;
  --card-name: #16277a;
  --card-res: #c62828;
  --card-time: #555555;
}

body.theme-black_red {
  --bg: #000000;
  --bar: #e30613;      /* bright red bars: LIVE RESULT + Today Lucky Number */
  --section: #1a1a1a;  /* dark section bars + navbar + footer (as in the sample) */
  --border: #e30613;   /* red borders everywhere */
  --btn: #e30613;      /* red buttons */
  --navtext: #ff5252;  /* red nav/footer text on the dark bars */
  --logo: #ffffff;
  --text: #e6e6e6;
  /* result game cards — dark cards to match the black theme */
  --card: #141414;
  --card-hi: #3a0000;
  --card-name: #ffd600;
  --card-res: #ffffff;
  --card-time: #cccccc;
}

body.theme-blue_white {
  --bg: #ffffff;
  --bar: #16277a;
  --section: #16277a;
  --border: #16277a;
  --btn: #e53935;   /* red action buttons (REFRESH / WhatsApp) as in the sample */
  --navtext: #ffcf40;
  --logo: #16277a;
  --text: #222222;
  /* result game cards */
  --card: #ffffff;
  --card-hi: #e3f2fd;
  --card-name: #16277a;
  --card-res: #16277a;
  --card-time: #555555;
}

/* ---------- Apply the palette ---------- */
/* base background + inherited text color (children with their own
   explicit color keep it; only un-colored text — e.g. the DB
   article/SEO content — follows --text, so it stays readable) */
body.themed { background-color: var(--bg) !important; }

/* DB article / SEO content (home page_html + about/terms pages):
   force readable text on every theme, overriding any inline colors
   that live inside the stored HTML. */
body.themed .seo-article,
body.themed .seo-article * { color: var(--text) !important; }

/* keyword heading strip (.slash-text) sits on the page background,
   and is hard-coded black — recolor it to the theme text color.
   (only the heading, not the pink .borderwa keyword box inside it) */
body.themed .slash-text > h2 { color: var(--text) !important; }

/* top header notice ticker ("DHAMAKA GUESSING ... Madhur Morning") is
   hard-coded black — follow the theme text colour so it stays visible on
   dark backgrounds (on black_red it was black-on-black = invisible).
   Any inline colours inside the notice HTML (e.g. red "DHAMAKA") stay. */
body.themed .ticker-text.notice-header { color: var(--text) !important; }

/* logo text (keep it readable / on-theme on every background) */
body.themed .site-logo,
body.themed .site-logo b { color: var(--logo) !important; }
/* keep one highlighted letter in the theme's accent colour */
body.themed .site-logo .logo-accent { color: var(--navtext) !important; }

/* bordered boxes */
body.themed .logo,
body.themed .mrque-div,
body.themed .satta-text,
body.themed .cm-patti,
body.themed .matka-result,
body.themed .conta,
body.themed .slash-text,
body.themed .satta-result,
body.themed .paid-gm,
body.themed .dp-topbox,
body.themed .dp-notice { border-color: var(--border) !important; }

/* primary result bars */
body.themed .matka-result .live-result-header,
body.themed .matka-result h4,
body.themed .paid-gm h4 { background-color: var(--bar) !important; }

/* dark section header bars (e.g. "MATKA LIVE GAME RESULTS", chart records) */
body.themed .head h2,
body.themed .head2 h2 { background-color: var(--section) !important; }

/* "Today Lucky Number" gradient bar */
body.themed .cm-patti h1 { background-image: none !important; background-color: var(--bar) !important; }

/* "Today Lucky Number" table: keep a clean white grid on EVERY theme
   (so the dark headers + red values stay readable, incl. black_red) */
body.themed .cm-patti table,
body.themed .cm-patti table th,
body.themed .cm-patti table td { background-color: #ffffff !important; }
body.themed .cm-patti table th b { color: #222222 !important; }
body.themed .cm-patti table td b { color: #d81b1b !important; }

/* buttons / floating buttons */
body.themed .refresh-btn,
body.themed .flotting-btn,
body.themed .matka-card a,
body.themed .telegram1 { background-color: var(--btn) !important; border-color: var(--btn) !important; }

/* top navbar (header) */
body.themed nav { background: var(--section) !important; }
body.themed nav a { color: var(--navtext) !important; }

/* chart-record link bars ("ALL MATKA JODI/PANEL CHART RECORDS" lists) */
body.themed .sing-chat-area ul li p {
  background: var(--btn) !important;
  color: #ffffff !important;
  border-left-color: var(--section) !important;
  border-right-color: var(--section) !important;
}

/* REFRESH shown as a themed button (not a dull dark bar) */
/* center the compact button inside its bar (block section headers,
   which are full-width, are unaffected by text-align) */
body.themed .head,
body.themed .head2 { text-align: center !important; }

body.themed .head h2.refresh-bar,
body.themed .head2 h2.refresh-bar {
  background-color: var(--btn) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  display: inline-block !important;
  width: auto !important;
  max-width: 100% !important;
  padding: 12px 26px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
/* circular-arrow refresh icon before the text (as in the sample buttons) */
body.themed .head h2.refresh-bar::before,
body.themed .head2 h2.refresh-bar::before {
  content: "\f021";
  font-family: FontAwesome;
  font-weight: normal;
  margin-right: 8px;
}

/* Black & Red: red band behind the logo, with a yellow accent letter
   (matches the sample where the highlighted letter is yellow on red) */
body.theme-black_red .logo-bar {
  background: #9b0010 !important;
  border-radius: 10px 0 10px 10px;
  padding: 6px 0;
  margin-bottom: 6px;
}
body.theme-black_red .site-logo .logo-accent { color: #ffd600 !important; }

/* Blue & White: solid blue logo band with WHITE logo text + gold accent
   (matches the sample where the whole top strip is blue, not white) */
body.theme-blue_white .logo-bar {
  background: #16277a !important;
  border-radius: 10px 0 10px 10px;
  padding: 6px 0;
  margin-bottom: 6px;
}
body.theme-blue_white .site-logo,
body.theme-blue_white .site-logo b { color: #ffffff !important; }
body.theme-blue_white .site-logo .logo-accent { color: #ffd600 !important; }

/* Black & Red: result-card interior stays BLACK (drop the gold/red
   festive background images so it matches the sample's black card) */
body.theme-black_red .gold-res-area,
body.theme-black_red .gold-payment-type,
body.theme-black_red .matka-card { background: #000000 !important; }

/* footer */
body.themed .gold-footer { background-color: var(--section) !important; }
body.themed .footer-links a { color: var(--navtext) !important; }

/* ============================================================
   "MATKA ALL GAME RESULTS" cards — follow the theme instead of
   the hard-coded yellow(highlight)/peach(normal) inline colours.
   (default/unthemed site keeps the original inline colours)
   ============================================================ */
body.themed .satta-result .sr-inner { background-color: var(--card) !important; }
body.themed .satta-result .sr-inner.is-highlight { background-color: var(--card-hi) !important; }

body.themed .satta-result .game-name-row,
body.themed .satta-result .game-name-row * { color: var(--card-name) !important; }

body.themed .satta-result .game-data-row,
body.themed .satta-result .game-data-row * { color: var(--card-res) !important; }

body.themed .satta-result .game-timeing-row,
body.themed .satta-result .game-timeing-row * { color: var(--card-time) !important; }

/* Jodi / Panel chart buttons on the cards -> theme button colour */
body.themed .satta-result .btn_chart {
  background-color: var(--btn) !important;
  border-color: var(--btn) !important;
  color: #ffffff !important;
}

/* ---------- Red theme: match sample image exactly ---------- */
/* "Today Lucky Number" bar is a warm gold gradient (not solid red) */
body.theme-red .cm-patti h1 {
  background-image: linear-gradient(to right, #f9a825, #fdd835, #f9a825) !important;
  background-color: transparent !important;
  color: #b71c1c !important;
  border-bottom-color: #ffffffb0 !important;
}
/* LIVE RESULT single-result box is white with red text */
body.theme-red .matka-card .g-sing-result { background-color: #ffffff !important; }
body.theme-red .matka-card .g-sing-result h3 { color: #b71c1c !important; }
body.theme-red .matka-card .g-sing-result .blinking { color: #e53935 !important; }

/* ---------- Blue & Yellow: match sample image ---------- */
/* clean white result area (drop the festive b2.webp background) */
body.theme-blue_yellow .gold-res-area,
body.theme-blue_yellow .gold-payment-type,
body.theme-blue_yellow .matka-card { background: #ffffff !important; }
/* LIVE RESULT single-result box: white box, blue name, gold number */
body.theme-blue_yellow .matka-card .g-sing-result { background-color: #ffffff !important; }
body.theme-blue_yellow .matka-card .g-sing-result h3 { color: #16277a !important; }
body.theme-blue_yellow .matka-card .g-sing-result .blinking { color: #f9a825 !important; }

/* ---------- Blue & White: match sample image ---------- */
/* clean white result area (drop the festive b2.webp background) */
body.theme-blue_white .gold-res-area,
body.theme-blue_white .gold-payment-type,
body.theme-blue_white .matka-card { background: #ffffff !important; }
/* LIVE RESULT single-result box: gold pill, blue name, red number */
body.theme-blue_white .matka-card .g-sing-result { background-color: #fcec03 !important; }
body.theme-blue_white .matka-card .g-sing-result h3 { color: #16277a !important; }
body.theme-blue_white .matka-card .g-sing-result .blinking { color: #d81b1b !important; }

/* ---------- Black & Red: match sample image ---------- */
/* LIVE RESULT single-result box: gold pill on black, dark name, red number */
body.theme-black_red .matka-card .g-sing-result { background-color: #fcec03 !important; }
body.theme-black_red .matka-card .g-sing-result h3 { color: #212121 !important; }
body.theme-black_red .matka-card .g-sing-result .blinking { color: #d81b1b !important; }
