/* Stock Market module — component styles that sit on top of the host's Tailwind build.
   Brand dark (#093134) is reserved for the nav menu + footer (and text). Buttons, active tabs and
   badges use its mid tone (#37777C, white text); soft surfaces use its light tints. Change colours: up #137333, down #D72323, flat #0899E7. */

.sm-body {
    --sm-primary: #093134;      /* text / links only */
    --sm-fill: #37777C;         /* active / hover fill (white text) — tailwind primary-300 */
    --sm-fill-hover: #2c6a6f;
    --sm-accent: #205458;       /* text on light tints */
    --sm-tint: #e4f6fa;         /* soft surfaces */
    --sm-tint-strong: #b8e0e3;  /* borders */
    --sm-border: #e2e8f0; --sm-muted: #64748b;
}

/* Grid children default to min-width:auto, which lets a wide table push the page sideways on phones. */
.sm-body main .grid > * { min-width: 0; }

/* Flat components: white cards on the grey page (#f6f7f9) — no borders, no shadows. Only floating
   layers (search dropdown, dialogs) get a shadow, since they must lift off the page. */
.sm-card { background: #fff; border-radius: 1rem; }
.sm-heading { font-size: 1rem; font-weight: 800; color: #0f172a; letter-spacing: -.01em; }
.sm-link { font-size: .75rem; font-weight: 700; color: var(--sm-primary); }
.sm-link:hover { text-decoration: underline; }

/* "View more →" button on every section (links to the section's page on ShareHub).
   Arrow-only circle at rest; the label slides out on hover / keyboard focus. */
.sm-more { display: inline-flex; flex: none; align-items: center; height: 1.75rem; min-width: 1.75rem; justify-content: center; border: 0; border-radius: 9999px; padding: 0 .4rem; font-size: .72rem; font-weight: 800; color: var(--sm-primary); background: #f6f7f9; white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s, padding .2s; }
.sm-more svg { width: .9rem; height: .9rem; flex: none; transition: transform .2s; }
.sm-more-label { display: inline-block; max-width: 0; overflow: hidden; opacity: 0; transition: max-width .25s ease, opacity .2s ease, margin .25s ease; }
.sm-more:hover, .sm-more:focus-visible { background: var(--sm-fill); color: #fff; padding: 0 .55rem 0 .8rem; outline: none; }
.sm-more:hover .sm-more-label, .sm-more:focus-visible .sm-more-label { max-width: 12rem; opacity: 1; margin-right: .3rem; }
.sm-more:hover svg, .sm-more:focus-visible svg { transform: translateX(1px); }
@media (prefers-reduced-motion: reduce) { .sm-more, .sm-more-label, .sm-more svg { transition: none; } }

/* section header: title left, actions (tabs / view more) right */
.sm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.sm-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* Desktop nav: every item full white (inactive must not look disabled). The active item gets a
   rounded light-teal tab bar with a soft glow; hover previews the same bar growing from the centre. */
.sm-nav-link { position: relative; white-space: nowrap; padding: .8rem .85rem; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; transition: color .15s; }
@media (min-width: 1280px) { .sm-nav-link { font-size: .875rem; } }
.sm-nav-link::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
    background: linear-gradient(90deg, #7FB9BD, #e4f6fa 50%, #7FB9BD); box-shadow: 0 -2px 10px rgba(184, 224, 227, .55);
    transform: scaleX(0); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
.sm-nav-link:hover::after { transform: scaleX(.55); opacity: .55; }
.sm-nav-link.is-active::after { transform: scaleX(1); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .sm-nav-link::after { transition: none; } }

/* tables */
.sm-table { width: 100%; font-size: .8125rem; border-collapse: collapse; }
/* The host's site.css boxes every <thead> (border: 1px solid #dddddd6e) — reset it here so the head
   gets top + bottom rules only, no left / right sides. */
.sm-table thead { border: 0; }
.sm-table th { padding: .5rem .5rem; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; text-align: left; white-space: nowrap; border: 0; border-top: 1px solid #eef2f6; border-bottom: 1px solid #eef2f6; background: #fff; }
.sm-table th.text-right { text-align: right; }
.sm-table td { padding: .5rem .5rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
/* Cell text base: medium weight + dark slate so tables don't read thin (Mulish 400 is light).
   :where() keeps specificity at zero, so per-cell utilities (text-slate-500, font-bold, …) still win. */
:where(.sm-table) td { font-weight: 500; color: #1e293b; }
.sm-table td:first-child, .sm-table th:first-child { padding-left: 0; }
.sm-table td:last-child, .sm-table th:last-child { padding-right: 0; }
.sm-table tbody tr:last-child td { border-bottom: 0; }
.sm-table td.text-right { white-space: nowrap; }   /* numbers never wrap ("79.63 Lakh" stays on one line) */
.sm-table tbody tr:hover td { background: #f8fafc; }
.sm-table th[data-sort] { cursor: pointer; user-select: none; }
.sm-table th[data-sort]:hover { color: var(--sm-primary); }
.sm-table th[data-dir="asc"]::after { content: " ▲"; font-size: .55rem; }
.sm-table th[data-dir="desc"]::after { content: " ▼"; font-size: .55rem; }
.sm-table-sticky thead th { position: sticky; top: 0; z-index: 1; }
/* Pinned first column (symbol) while the wide table scrolls sideways. Cells need an opaque background;
   a hairline on the right marks the edge once data slides underneath. */
.sm-table-pin-first th:first-child,
.sm-table-pin-first td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 #eef2f6; padding-right: .75rem; }
.sm-table-pin-first thead th:first-child { z-index: 3; }   /* corner: above both sticky header and column */
.sm-table-pin-first tbody tr:hover td:first-child { background: #f8fafc; }

/* Phones: tighter type + spacing so tables and cards fit 360–414px screens without wrapping. */
@media (max-width: 639.98px) {
    .sm-heading { font-size: .9375rem; }
    .sm-table { font-size: .75rem; }
    .sm-table th { font-size: .625rem; padding: .4rem .3rem; }
    .sm-table td { padding: .45rem .3rem; }
    .sm-body main .sm-card.p-4 { padding: .875rem; }
    .sm-body main .sm-card.p-3 { padding: .75rem; }
}

/* tabs / segmented buttons */
.sm-tab, .sm-range-btn, .sm-type-btn { border-radius: .375rem; padding: .25rem .625rem; color: #64748b; transition: background-color .15s, color .15s; }
.sm-tab:hover, .sm-range-btn:hover, .sm-type-btn:hover { color: var(--sm-primary); }
.sm-tab.is-active, .sm-range-btn.is-active, .sm-type-btn.is-active { background: var(--sm-fill); color: #fff; }
.sm-tab-pill { background: #f6f7f9; border-radius: 9999px; padding: .375rem .875rem; }
.sm-tab-pill.is-active { background: var(--sm-fill); }

/* marquee */
.sm-ticker-viewport { -webkit-mask-image: linear-gradient(90deg, transparent, #000 2rem, #000 calc(100% - 2rem), transparent); mask-image: linear-gradient(90deg, transparent, #000 2rem, #000 calc(100% - 2rem), transparent); }
.sm-ticker-track { animation: sm-ticker 120s linear infinite; }
.sm-ticker:hover .sm-ticker-track { animation-play-state: paused; }
@keyframes sm-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .sm-ticker-track { animation: none; } .sm-ticker-viewport { overflow-x: auto; } }

.sm-pulse { animation: sm-pulse 1.6s ease-in-out infinite; }
@keyframes sm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Soft scrollbars for every scrollable area on these pages (wide tables, news list, dropdowns).
   The host's site.css paints all scrollbars dark teal (#093134) and sets an INHERITED scrollbar-color
   on <body>, so it's overridden here for everything inside the stock-market layout. */
.sm-body * { scrollbar-width: thin; scrollbar-color: #dfe5ec transparent; }
.sm-body *::-webkit-scrollbar { width: 4px; height: 4px; }
.sm-body *::-webkit-scrollbar-track { background: transparent; }
.sm-body *::-webkit-scrollbar-thumb { background: #dfe5ec; border-radius: 9999px; }
.sm-body *::-webkit-scrollbar-thumb:hover { background: #c5ced8; }
/* Phones: horizontal bars on tables are pure noise (swiping is the gesture) — hide them there. */
@media (max-width: 767.98px) and (pointer: coarse) {
    .sm-body main .overflow-x-auto, .sm-body main .overflow-auto { scrollbar-width: none; }
    .sm-body main .overflow-x-auto::-webkit-scrollbar, .sm-body main .overflow-auto::-webkit-scrollbar { height: 0; }
}

.sm-scroll-x { scrollbar-width: none; }
.sm-scroll-x::-webkit-scrollbar { display: none; }

/* rich text from the feeds (company description, FAQs, announcements) */
.sm-prose p { margin: 0 0 .75em; }
.sm-prose ul { list-style: disc; padding-left: 1.25rem; margin: 0 0 .75em; }
.sm-prose ol { list-style: decimal; padding-left: 1.25rem; margin: 0 0 .75em; }
.sm-prose a { color: var(--sm-primary); text-decoration: underline; }
.sm-prose table { width: 100%; border-collapse: collapse; margin: .5em 0; font-size: .8125rem; }
.sm-prose td, .sm-prose th { border: 1px solid var(--sm-border); padding: .25rem .5rem; }
.sm-prose img { max-width: 100%; height: auto; }

/* News list: row separators that work in 1 or 2 columns (top border on every row except the first row). */
.sm-news-item { border-top: 1px solid #f1f5f9; }
.sm-news-item:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 768px) and (max-width: 1279.98px) {
    .sm-news-item:nth-child(2) { border-top: 0; padding-top: 0; }
}
/* Desktop sidebar: sticky under the nav bar, never taller than the screen; the list scrolls inside. */
.sm-news-sticky { position: sticky; top: 3.75rem; }
.sm-news-sticky .sm-news { max-height: calc(100vh - 4.75rem); }
.sm-news-sticky .sm-news-list { overflow-y: auto; overscroll-behavior: contain; }
.sm-scroll-y { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.sm-scroll-y::-webkit-scrollbar { width: 4px; }
.sm-scroll-y::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Selects: own chevron with room on the right (the native arrow hugs the edge). */
.sm-select { -webkit-appearance: none; appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 1rem; text-overflow: ellipsis; cursor: pointer; }

/* slider arrows (md+; phones swipe) */
.sm-slider-btn { position: absolute; top: 50%; z-index: 2; display: none; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: 9999px; background: #fff; color: var(--sm-accent); box-shadow: 0 4px 14px rgba(15, 23, 42, .15); margin-top: -1rem; transition: background-color .15s, color .15s; }
.sm-slider-btn:hover { background: var(--sm-fill); color: #fff; }
@media (min-width: 768px) { .sm-slider-btn:not([hidden]) { display: flex; } }

/* mobile drawer slide-in */
.sm-drawer-panel { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 10px 40px rgba(15, 23, 42, .25); }
.sm-drawer-backdrop { opacity: 0; transition: opacity .22s ease; }
[data-sm-drawer].is-open .sm-drawer-panel { transform: none; }
[data-sm-drawer].is-open .sm-drawer-backdrop { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .sm-drawer-panel, .sm-drawer-backdrop { transition: none; } }

.sm-dialog::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }

/* search results */
.sm-search-results a.is-selected { background: #f1f5f9; }

/* ---------------------------------------------------------------- AdSense Auto ads
   No manual units: AdSense injects <ins class="adsbygoogle google-auto-placed"> wrappers between our
   blocks. Pages are built as vertical stacks of full-width sections (grids live INSIDE sections), so
   insertions land between whole sections. These rules keep any insertion tidy wherever it lands. */

/* Landed inside a CSS grid (e.g. between two cards)? Span the full row instead of squeezing into a cell. */
.sm-body main .grid > .google-auto-placed,
.sm-body main .grid > ins.adsbygoogle { grid-column: 1 / -1; }

/* Consistent breathing room around in-page ads so they're clearly separate from data, tabs and buttons. */
.sm-body main .google-auto-placed { display: block; width: 100%; margin: 1.25rem auto !important; clear: both; }

/* Unfilled insertion → give the space back. */
.sm-body .google-auto-placed:has(ins[data-ad-status="unfilled"]),
.sm-body ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* Bottom anchor ad overlays the page — keep the footer's last line reachable while it's shown. */
body.sm-body:has(ins.adsbygoogle[data-anchor-status="displayed"]) { padding-bottom: 100px; }
