﻿/* AANYA OPTIONS WEB V3.41K - TALLER/NARROWER MOBILE-READABLE CELLS */

.c.sig.aanya-explicit-chart-cell{
  position:relative !important;
  min-width:52px !important;
  padding-left:1px !important;
  padding-right:18px !important;
  padding-top:5px !important;
  padding-bottom:5px !important;
  cursor:default !important;
  user-select:none;
}

.c.sig.aanya-explicit-chart-cell .cur{
  font-size:17px !important;
  line-height:22px !important;
  font-weight:900 !important;
}

.c.sig.aanya-explicit-chart-cell .hist{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:2px !important;
  min-height:22px !important;
}

.c.sig.aanya-explicit-chart-cell .hist > span.first,
.c.sig.aanya-explicit-chart-cell .hist > span.old{
  width:19px !important;
  min-width:19px !important;
  height:19px !important;
  min-height:19px !important;
  line-height:19px !important;
  padding:0 !important;
  margin:0 !important;
  border-radius:50% !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
  border:1px solid currentColor !important;
  font-size:10px !important;
  font-weight:900 !important;
}

@keyframes aanyaLatestClosedSignalBlinkV341K{
  0%,44%{opacity:1;transform:scale(1)}
  50%,94%{opacity:.18;transform:scale(.90)}
  100%{opacity:1;transform:scale(1)}
}

.c.sig.aanya-explicit-chart-cell .aanya-latest-closed-signal-blink{
  animation:aanyaLatestClosedSignalBlinkV341K .9s steps(1,end) infinite !important;
}

/* PREV2 and PREV3 never blink. */
.c.sig.aanya-explicit-chart-cell .hist > span.old{
  animation:none !important;
}

.aanya-cell-chart-actions{
  position:absolute;
  top:3px;
  right:1px;
  bottom:3px;
  width:16px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
  z-index:10;
}

.aanya-cell-chart-btn{
  width:16px !important;
  min-width:16px !important;
  height:20px !important;
  min-height:20px !important;
  padding:0 !important;
  margin:0 !important;
  border-radius:2px !important;
  background:#fff !important;
  font-size:12px !important;
  line-height:18px !important;
  font-family:Arial,sans-serif !important;
  font-weight:1000 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  cursor:pointer !important;
}

.aanya-cell-chart-btn.aanya-chart-btn{
  color:#138a2e !important;
  border:1px solid #7fb98c !important;
}

.aanya-cell-chart-btn.tv-chart-btn{
  color:#2468d9 !important;
  border:1px solid #91abe0 !important;
}

@media (max-width:900px){
  .c.sig.aanya-explicit-chart-cell{
    min-width:54px !important;
    padding-top:7px !important;
    padding-bottom:7px !important;
    padding-right:20px !important;
  }

  .c.sig.aanya-explicit-chart-cell .cur{
    font-size:18px !important;
    line-height:24px !important;
  }

  .c.sig.aanya-explicit-chart-cell .hist > span.first,
  .c.sig.aanya-explicit-chart-cell .hist > span.old{
    width:20px !important;
    min-width:20px !important;
    height:20px !important;
    min-height:20px !important;
    line-height:20px !important;
    font-size:11px !important;
  }

  .aanya-cell-chart-actions{width:18px !important}

  .aanya-cell-chart-btn{
    width:18px !important;
    min-width:18px !important;
    height:22px !important;
    min-height:22px !important;
    font-size:13px !important;
  }
}

/* AANYA OPTIONS WEB V3.41L
   FINAL BLINK RULE:
   ONLY FIRST CIRCLE (PREV1) may blink.
   It blinks ONLY when it contains a real signal.
   CUR never blinks. PREV2/PREV3 never blink.
   Applies to NIFTY + CRUDE.
*/
@keyframes aanyaFirstCircleSignalBlinkV341L{
  0%,44%{opacity:1;transform:scale(1)}
  50%,94%{opacity:.18;transform:scale(.90)}
  100%{opacity:1;transform:scale(1)}
}

.c.sig.aanya-explicit-chart-cell .cur,
.c.sig.aanya-explicit-chart-cell .hist > span.old{
  animation:none !important;
}

.c.sig.aanya-explicit-chart-cell .hist > span.first{
  animation:none !important;
}

.c.sig.aanya-explicit-chart-cell .hist > span.first.aanya-first-circle-signal-blink{
  animation:aanyaFirstCircleSignalBlinkV341L .9s steps(1,end) infinite !important;
}

/* AANYA OPTIONS WEB V3.41M - SIGNAL FONT HIERARCHY
   BOTH NIFTY + CRUDE
   First circle: larger + bolder.
   Non-circled CUR signal: smaller + lighter.
   Blink and chart routing unchanged.
*/

/* Current / non-circled signal: reduce emphasis. */
.c.sig.aanya-explicit-chart-cell .cur{
  font-size:14px !important;
  line-height:20px !important;
  font-weight:700 !important;
}

/* First circle / PREV1: increase signal readability and emphasis. */
.c.sig.aanya-explicit-chart-cell .hist > span.first{
  width:20px !important;
  min-width:20px !important;
  height:20px !important;
  min-height:20px !important;
  line-height:20px !important;
  font-size:12px !important;
  font-weight:1000 !important;
}

/* PREV2 / PREV3 remain secondary. */
.c.sig.aanya-explicit-chart-cell .hist > span.old{
  font-size:9px !important;
  font-weight:700 !important;
}

@media (max-width:900px){
  .c.sig.aanya-explicit-chart-cell .cur{
    font-size:14px !important;
    line-height:21px !important;
    font-weight:700 !important;
  }

  .c.sig.aanya-explicit-chart-cell .hist > span.first{
    width:22px !important;
    min-width:22px !important;
    height:22px !important;
    min-height:22px !important;
    line-height:22px !important;
    font-size:13px !important;
    font-weight:1000 !important;
  }

  .c.sig.aanya-explicit-chart-cell .hist > span.old{
    font-size:10px !important;
    font-weight:700 !important;
  }
}

/* AANYA OPTIONS WEB V3.41N - STABLE FIRST-CIRCLE BLINK */

/* Kill every older blink animation so there is only one source of truth. */
.c.sig.aanya-explicit-chart-cell .aanya-prev1-blink,
.c.sig.aanya-explicit-chart-cell .aanya-latest-closed-blink,
.c.sig.aanya-explicit-chart-cell .aanya-latest-closed-signal-blink,
.c.sig.aanya-explicit-chart-cell .cur,
.c.sig.aanya-explicit-chart-cell .hist > span.old{
  animation:none !important;
}

@keyframes aanyaStableFirstCircleBlinkV341N{
  0%,42%{
    opacity:1;
    transform:scale(1);
  }
  48%,92%{
    opacity:.12;
    transform:scale(.88);
  }
  100%{
    opacity:1;
    transform:scale(1);
  }
}

/* ONLY the first circle, and only when JS confirms it has a real signal. */
.c.sig.aanya-explicit-chart-cell .hist > span.first.aanya-first-circle-signal-blink{
  animation:aanyaStableFirstCircleBlinkV341N 1s steps(1,end) infinite !important;
}

/* AANYA OPTIONS WEB V3.41O - FINAL BLINK OVERRIDE */

/* Turn off every obsolete blink implementation. */
.c.sig.aanya-explicit-chart-cell .aanya-prev1-blink,
.c.sig.aanya-explicit-chart-cell .aanya-latest-closed-blink,
.c.sig.aanya-explicit-chart-cell .aanya-latest-closed-signal-blink,
.c.sig.aanya-explicit-chart-cell .cur,
.c.sig.aanya-explicit-chart-cell .hist > span.old{
  animation:none !important;
}

@keyframes aanyaFirstCircleBlinkV341O{
  0%,40%{
    opacity:1;
    transform:scale(1);
  }
  50%,90%{
    opacity:.08;
    transform:scale(.84);
  }
  100%{
    opacity:1;
    transform:scale(1);
  }
}

/* Only first circle with a real signal gets this class. */
.c.sig.aanya-explicit-chart-cell .hist > span.first.aanya-first-circle-signal-blink{
  animation:aanyaFirstCircleBlinkV341O 1.1s steps(1,end) infinite !important;
}

/* AANYA OPTIONS WEB V3.41P - DISABLE CSS BLINK; JS WALL-CLOCK OWNS BLINK */

/* CRUDE replaces the signal DOM repeatedly; CSS animations restart on each redraw.
   Disable all animation rules and let V3.41P apply the blink phase directly. */
#grid .c.sig .cur,
#grid .c.sig .hist > span.first,
#grid .c.sig .hist > span.old{
  animation:none !important;
  transition:none !important;
}

/* AANYA OPTIONS WEB V3.41Q - DARK THEME SOFT BUTTONS
   Visual-only. Removes harsh white chart-button backgrounds in dark theme.
*/

/* Light theme stays clean. */
.aanya-cell-chart-btn{
  background:#f7f8fa !important;
}

/* Dark/system-dark theme: use a soft dark surface instead of white. */
@media (prefers-color-scheme: dark){
  .aanya-cell-chart-btn{
    background:#1f2937 !important;
    box-shadow:none !important;
  }

  .aanya-cell-chart-btn.aanya-chart-btn{
    color:#7ddc93 !important;
    border-color:#4f8f60 !important;
  }

  .aanya-cell-chart-btn.tv-chart-btn{
    color:#8fb6ff !important;
    border-color:#5578b5 !important;
  }
}

/* Also support common app dark-theme markers if present. */
html.dark .aanya-cell-chart-btn,
body.dark .aanya-cell-chart-btn,
[data-theme="dark"] .aanya-cell-chart-btn,
.theme-dark .aanya-cell-chart-btn{
  background:#1f2937 !important;
  box-shadow:none !important;
}

html.dark .aanya-cell-chart-btn.aanya-chart-btn,
body.dark .aanya-cell-chart-btn.aanya-chart-btn,
[data-theme="dark"] .aanya-cell-chart-btn.aanya-chart-btn,
.theme-dark .aanya-cell-chart-btn.aanya-chart-btn{
  color:#7ddc93 !important;
  border-color:#4f8f60 !important;
}

html.dark .aanya-cell-chart-btn.tv-chart-btn,
body.dark .aanya-cell-chart-btn.tv-chart-btn,
[data-theme="dark"] .aanya-cell-chart-btn.tv-chart-btn,
.theme-dark .aanya-cell-chart-btn.tv-chart-btn{
  color:#8fb6ff !important;
  border-color:#5578b5 !important;
}

/* AANYA OPTIONS WEB V3.41R - DARK THEME SOFT WHITES
   Visual-only override for BOTH NIFTY + CRUDE.
   Replaces harsh pure-white surfaces/text in dark mode with softer dark surfaces
   and off-white text. Signal colours remain intact.
*/

@media (prefers-color-scheme: dark){
  html, body{
    background:#111827 !important;
    color:#d7dde7 !important;
  }

  /* Common white/light surfaces */
  header, .header, .topbar, .toolbar, .panel, .card, .box,
  .controls, .control, .market-card, .table-wrap, .table-container,
  input, select, button{
    background-color:#1b2432 !important;
  }

  /* General text that was pure white */
  body, header, .header, .topbar, .toolbar, .panel, .card, .box,
  .controls, .control, label, .label, .value{
    color:#d7dde7 !important;
  }

  /* Table/grid dark surfaces */
  #grid, #grid .r, #grid .c{
    background-color:#151e2b !important;
  }

  #grid .r.head .c{
    background-color:#202b3a !important;
    color:#dce2ea !important;
  }

  /* Strike/LTP/general neutral text: soft rather than brilliant white */
  #grid .strike,
  #grid .ltp,
  #grid .contract,
  #grid .c:not(.sig){
    color:#d4dae3 !important;
  }

  /* Inputs/dropdowns */
  input, select{
    color:#d7dde7 !important;
    border-color:#465264 !important;
  }

  /* Explicit chart buttons */
  .aanya-cell-chart-btn{
    background:#202a38 !important;
    box-shadow:none !important;
  }

  .aanya-cell-chart-btn.aanya-chart-btn{
    color:#7ddc93 !important;
    border-color:#4f8f60 !important;
  }

  .aanya-cell-chart-btn.tv-chart-btn{
    color:#8fb6ff !important;
    border-color:#5578b5 !important;
  }
}

/* Support app-controlled dark mode as well as system dark mode. */
:is(html.dark, body.dark, [data-theme="dark"], .theme-dark){
  background:#111827 !important;
  color:#d7dde7 !important;
}

:is(html.dark, body.dark, [data-theme="dark"], .theme-dark)
:is(header,.header,.topbar,.toolbar,.panel,.card,.box,.controls,.control,.market-card,.table-wrap,.table-container,input,select,button){
  background-color:#1b2432 !important;
  color:#d7dde7 !important;
}

:is(html.dark, body.dark, [data-theme="dark"], .theme-dark) #grid,
:is(html.dark, body.dark, [data-theme="dark"], .theme-dark) #grid .r,
:is(html.dark, body.dark, [data-theme="dark"], .theme-dark) #grid .c{
  background-color:#151e2b !important;
}

:is(html.dark, body.dark, [data-theme="dark"], .theme-dark) #grid .r.head .c{
  background-color:#202b3a !important;
  color:#dce2ea !important;
}

:is(html.dark, body.dark, [data-theme="dark"], .theme-dark) #grid .strike,
:is(html.dark, body.dark, [data-theme="dark"], .theme-dark) #grid .ltp,
:is(html.dark, body.dark, [data-theme="dark"], .theme-dark) #grid .contract,
:is(html.dark, body.dark, [data-theme="dark"], .theme-dark) #grid .c:not(.sig){
  color:#d4dae3 !important;
}

/* Do not override semantic signal colours. */
#grid .c.sig .cur,
#grid .c.sig .hist > span{
  /* existing signal/tone colour rules remain the source of truth */
}

/* AANYA_V345A4B18A_BLINK_ONLY_OVERRIDE_START
   BLINK-ONLY CHANGE. UI/layout/theme/chart controls are untouched.
   Display mapping: Circle1=PREV3, Circle2=PREV2, Circle3=PREV1.
*/
#grid .c.sig .cur,
#grid .c.sig .hist > span.first,
#grid .c.sig .hist > span.old{
  animation:none !important;
  transition:none !important;
}

@keyframes aanyaLatestClosedOnlyBlinkV345A4B18A{
  0%,44%{opacity:1;transform:scale(1)}
  50%,94%{opacity:.18;transform:scale(.90)}
  100%{opacity:1;transform:scale(1)}
}

#grid .c.sig .hist > span.aanya-latest-closed-signal-blink{
  animation:aanyaLatestClosedOnlyBlinkV345A4B18A 1.75s steps(1,end) infinite !important;
  transform-origin:center !important;
}
/* AANYA_V345A4B18A_BLINK_ONLY_OVERRIDE_END */


/* AANYA OPTIONS WEB V3.45A4B21I - SIGNAL CIRCLE FONT PRIORITY
   Circle 1 = PREV3: small, normal.
   Circle 2 = PREV2: medium.
   Circle 3 = PREV1: largest and boldest.
   Layout, colors, blink timing and click routing unchanged.
*/
.c.sig.aanya-explicit-chart-cell .hist > span:nth-child(1){
  width:17px !important;
  min-width:17px !important;
  height:17px !important;
  min-height:17px !important;
  line-height:17px !important;
  font-size:9px !important;
  font-weight:400 !important;
}
.c.sig.aanya-explicit-chart-cell .hist > span:nth-child(2){
  width:19px !important;
  min-width:19px !important;
  height:19px !important;
  min-height:19px !important;
  line-height:19px !important;
  font-size:11px !important;
  font-weight:700 !important;
}
.c.sig.aanya-explicit-chart-cell .hist > span:nth-child(3){
  width:22px !important;
  min-width:22px !important;
  height:22px !important;
  min-height:22px !important;
  line-height:22px !important;
  font-size:13px !important;
  font-weight:1000 !important;
}
@media (max-width:900px){
  .c.sig.aanya-explicit-chart-cell .hist > span:nth-child(1){
    width:18px !important; min-width:18px !important;
    height:18px !important; min-height:18px !important;
    line-height:18px !important; font-size:9px !important; font-weight:400 !important;
  }
  .c.sig.aanya-explicit-chart-cell .hist > span:nth-child(2){
    width:20px !important; min-width:20px !important;
    height:20px !important; min-height:20px !important;
    line-height:20px !important; font-size:11px !important; font-weight:700 !important;
  }
  .c.sig.aanya-explicit-chart-cell .hist > span:nth-child(3){
    width:23px !important; min-width:23px !important;
    height:23px !important; min-height:23px !important;
    line-height:23px !important; font-size:14px !important; font-weight:1000 !important;
  }
}
