/* =============================================================
   Bharat Petroleum — Annual Report 2025-26
   Search UI.

   Standalone stylesheet (not part of style.scss). It borrows nothing
   from the reference build: every colour below is a BPCL token taken
   from style.scss, and the whole UI is set in Figtree, the report's
   own face. Dark mode follows the site's [data-bs-theme="dark"].
   ============================================================= */

:root {
  /* Light — the report's default: white surfaces, ink text, BPCL blue accent */
  --rs-bg-soft: #ffffff;
  --rs-bg-elev: #f6f9fc;
  --rs-border: rgba(0, 0, 0, 0.12);
  --rs-border-2: rgba(0, 0, 0, 0.22);
  --rs-text: #222222;          /* $ink   */
  --rs-text-2: #55606e;
  --rs-text-3: #8a949f;
  --rs-accent: #0e7dc2;        /* $blue      */
  --rs-accent-d: #0c69a3;      /* $blue-dark */
  --rs-accent-2: rgba(14, 125, 194, 0.10);
  --rs-mark-bg: rgba(250, 216, 2, 0.45);   /* $yellow — the report's highlighter */
  --rs-mark-fg: #1a0e50;                   /* $navy   */
  --rs-shadow: 0 22px 60px rgba(16, 32, 56, 0.18);
  --rs-row-hover: rgba(14, 125, 194, 0.05);
  --rs-row-active: rgba(14, 125, 194, 0.10);
  --rs-scrim: rgba(26, 14, 80, 0.55);      /* navy scrim, not black */

  --rs-font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

[data-bs-theme="dark"] {
  --rs-bg-soft: #121a2b;       /* --surface */
  --rs-bg-elev: #0b1220;       /* --bg      */
  --rs-border: rgba(255, 255, 255, 0.14);
  --rs-border-2: rgba(255, 255, 255, 0.26);
  --rs-text: #d7dee9;
  --rs-text-2: #aab4c4;
  --rs-text-3: #7d8798;
  --rs-accent: #4bb4ec;        /* --heading on dark */
  --rs-accent-d: #7fcbf3;
  --rs-accent-2: rgba(75, 180, 236, 0.16);
  --rs-mark-bg: rgba(250, 216, 2, 0.30);
  --rs-mark-fg: #fad802;
  --rs-shadow: 0 22px 60px rgba(0, 0, 0, 0.6);
  --rs-row-hover: rgba(255, 255, 255, 0.05);
  --rs-row-active: rgba(75, 180, 236, 0.14);
  --rs-scrim: rgba(4, 8, 16, 0.72);
}

/* ============================================================
   HEADER TRIGGER + INLINE INPUT (desktop)
   The header already ships a search icon; it becomes the toggle.
   The field unrolls to its left so the icon never moves.
   ============================================================ */
.rs-hs {
  position: relative;
  display: flex;
  align-items: center;
}
.rs-hs__field {
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease,
    margin-right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 0;
}
.rs-hs.is-open .rs-hs__field {
  width: 260px;
  opacity: 1;
  margin-right: 12px;
}
.rs-hs__input {
  width: 100%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  outline: none;
  color: #fff;
  font-family: var(--rs-font);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  padding: 7px 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.rs-hs__input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}
.rs-hs__input:focus {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.22);
}
/* The header sits on the hero video and turns blue when pinned — white-on-
   translucent reads correctly against both, so no scrolled-state override. */

@media (max-width: 1024px) {
  .rs-hs.is-open .rs-hs__field {
    width: 0;
    opacity: 0;
    margin-right: 0;
  }
}

/* ============================================================
   DROPDOWN — live results under the header field
   ============================================================ */
.rs-dd {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: min(560px, calc(100vw - 48px));
  max-height: min(70vh, 560px);
  overflow: auto;
  background: var(--rs-bg-soft);
  border: 1px solid var(--rs-border);
  border-radius: 16px;
  box-shadow: var(--rs-shadow);
  padding: 8px;
  z-index: 320;
  display: none;
  font-family: var(--rs-font);
  text-align: left;
}
.rs-dd.rs-open {
  display: block;
  animation: rs-fade 0.16s ease-out;
}
@keyframes rs-fade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rs-section {
  padding: 6px 4px;
}
.rs-section + .rs-section {
  border-top: 1px solid var(--rs-border);
  margin-top: 4px;
  padding-top: 10px;
}
.rs-section-h {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rs-text-3);
  padding: 6px 10px 8px;
}

.rs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 8px 4px;
}
.rs-chip {
  font-family: var(--rs-font);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border: 1px solid var(--rs-border);
  background: transparent;
  color: var(--rs-text-2);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rs-chip:hover {
  background: var(--rs-row-hover);
  color: var(--rs-text);
  border-color: var(--rs-border-2);
}
.rs-chip-clear {
  color: var(--rs-text-3);
}

/* ============================================================
   RESULT ROW
   ============================================================ */
.rs-dd-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rs-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  align-items: start;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--rs-text);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 12px;
  font-family: var(--rs-font);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.rs-row:hover,
.rs-row.rs-active {
  background: var(--rs-row-active);
  border-color: var(--rs-border-2);
}
.rs-row-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  grid-column: 1;
}
.rs-row .rs-cat {
  align-self: flex-start;
  margin-bottom: 2px;
}
.rs-row-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--rs-text);
}
.rs-row-snip {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--rs-text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rs-row mark {
  background: var(--rs-mark-bg);
  color: var(--rs-mark-fg);
  padding: 0 2px;
  border-radius: 3px;
}
.rs-row-icon {
  color: var(--rs-text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  align-self: center;
  grid-column: 2;
  grid-row: 1;
}
.rs-row:hover .rs-row-icon,
.rs-row.rs-active .rs-row-icon {
  color: var(--rs-accent);
}

/* Category pill — drawn from the report's own palette so the
   result list reads as part of the same document. */
.rs-cat {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.rs-cat-overview    { color: #0e7dc2; background: rgba(14, 125, 194, 0.10); border: 1px solid rgba(14, 125, 194, 0.28); }
.rs-cat-business    { color: #0b7f99; background: rgba(3, 189, 229, 0.12);  border: 1px solid rgba(3, 189, 229, 0.34); }
.rs-cat-performance { color: #1a0e50; background: rgba(26, 14, 80, 0.08);   border: 1px solid rgba(26, 14, 80, 0.24); }
.rs-cat-leadership  { color: #8a6100; background: rgba(205, 148, 56, 0.14); border: 1px solid rgba(205, 148, 56, 0.34); }
.rs-cat-strategy    { color: #0c69a3; background: rgba(12, 105, 163, 0.09); border: 1px solid rgba(12, 105, 163, 0.26); }
.rs-cat-esg         { color: #418831; background: rgba(65, 136, 49, 0.10);  border: 1px solid rgba(65, 136, 49, 0.28); }
.rs-cat-awards      { color: #8a6100; background: rgba(250, 216, 2, 0.22);  border: 1px solid rgba(205, 148, 56, 0.34); }
.rs-cat-downloads   { color: #55606e; background: rgba(85, 96, 110, 0.08);  border: 1px solid rgba(85, 96, 110, 0.24); }

[data-bs-theme="dark"] .rs-cat-overview    { color: #7fcbf3; background: rgba(75, 180, 236, 0.16);  border-color: rgba(75, 180, 236, 0.32); }
[data-bs-theme="dark"] .rs-cat-business    { color: #6fe0f5; background: rgba(3, 189, 229, 0.16);   border-color: rgba(3, 189, 229, 0.32); }
[data-bs-theme="dark"] .rs-cat-performance { color: #b9aef5; background: rgba(140, 124, 226, 0.16); border-color: rgba(140, 124, 226, 0.32); }
[data-bs-theme="dark"] .rs-cat-leadership  { color: #f0c465; background: rgba(205, 148, 56, 0.18);  border-color: rgba(205, 148, 56, 0.34); }
[data-bs-theme="dark"] .rs-cat-strategy    { color: #8ac6ec; background: rgba(75, 180, 236, 0.12);  border-color: rgba(75, 180, 236, 0.26); }
[data-bs-theme="dark"] .rs-cat-esg         { color: #96d488; background: rgba(65, 136, 49, 0.20);   border-color: rgba(65, 136, 49, 0.38); }
[data-bs-theme="dark"] .rs-cat-awards      { color: #fad802; background: rgba(250, 216, 2, 0.16);   border-color: rgba(250, 216, 2, 0.32); }
[data-bs-theme="dark"] .rs-cat-downloads   { color: #b6bfcc; background: rgba(180, 190, 205, 0.12); border-color: rgba(180, 190, 205, 0.26); }

/* ============================================================
   QUICK ANSWER CARD
   ============================================================ */
.rs-qa {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: var(--rs-bg-elev);
  border: 1px solid var(--rs-accent);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 4px 4px 10px;
  font-family: var(--rs-font);
  cursor: pointer;
  color: var(--rs-text);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.rs-qa::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--rs-accent);
}
.rs-qa:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(16, 32, 56, 0.12);
}
[data-bs-theme="dark"] .rs-qa:hover {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
.rs-qa-tag {
  align-self: start;
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 11px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--rs-accent);
  border-radius: 999px;
  white-space: nowrap;
}
[data-bs-theme="dark"] .rs-qa-tag {
  color: #0b1220;
}
.rs-qa-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.rs-qa-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rs-text-2);
}
.rs-qa-value {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--rs-text);
  font-variant-numeric: tabular-nums;
}
.rs-qa-note {
  font-size: 13px;
  color: var(--rs-text-2);
  line-height: 1.5;
}
.rs-qa-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rs-accent);
  white-space: nowrap;
}
.rs-qa:hover .rs-qa-cta {
  color: var(--rs-accent-d);
}
@media (max-width: 560px) {
  .rs-qa {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .rs-qa-cta {
    justify-self: flex-start;
  }
}

/* ============================================================
   DROPDOWN FOOTER + EMPTY STATES
   ============================================================ */
.rs-dd-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding: 10px 10px 4px;
  border-top: 1px solid var(--rs-border);
}
.rs-foot-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--rs-accent);
  border: 1.5px solid var(--rs-accent);
  padding: 7px 16px;
  font-family: var(--rs-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.rs-foot-btn:hover {
  background: var(--rs-accent);
  color: #fff;
}
[data-bs-theme="dark"] .rs-foot-btn:hover {
  color: #0b1220;
}
.rs-foot-btn:active {
  transform: scale(0.98);
}
.rs-foot-hint {
  font-size: 11.5px;
  color: var(--rs-text-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rs-foot-hint kbd {
  font-family: var(--rs-font);
  font-size: 10px;
  font-weight: 600;
  /* Bootstrap paints kbd near-black with white text; these keys are a quiet
     hint, so the background is reclaimed explicitly. */
  background: transparent;
  border: 1px solid var(--rs-border-2);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--rs-text-2);
}

.rs-empty {
  padding: 22px 14px 18px;
  text-align: left;
  color: var(--rs-text-2);
  font-family: var(--rs-font);
}
.rs-empty p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.55;
}
.rs-empty p:first-child {
  font-size: 20px;
  font-weight: 600;
  color: var(--rs-text);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.rs-empty-sub {
  color: var(--rs-text-3);
}
.rs-empty strong {
  color: var(--rs-accent);
  font-weight: 600;
}
.rs-link {
  background: none;
  border: none;
  color: var(--rs-accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}
.rs-empty-lg {
  padding: 60px 30px;
  text-align: center;
}

/* ============================================================
   FULL RESULTS OVERLAY
   ============================================================ */
.rs-ov {
  position: fixed;
  inset: 0;
  background: var(--rs-scrim);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 600;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 40px;
  overflow-y: auto;
}
.rs-ov.rs-open {
  display: flex;
  animation: rs-ov-in 0.22s ease-out;
}
@keyframes rs-ov-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.rs-ov-inner {
  width: 100%;
  max-width: 920px;
  background: var(--rs-bg-soft);
  border: 1px solid var(--rs-border);
  border-radius: 20px;
  box-shadow: var(--rs-shadow);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
  overflow: hidden;
  font-family: var(--rs-font);
}
.rs-ov-head {
  padding: 14px 16px 0;
  border-bottom: 1px solid var(--rs-border);
}
.rs-ov-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 14px;
}
.rs-ov-icon {
  color: var(--rs-accent);
  flex-shrink: 0;
}
.rs-ov-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--rs-text);
  font-family: var(--rs-font);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 8px 4px;
}
.rs-ov-input::placeholder {
  color: var(--rs-text-3);
  font-weight: 400;
}
.rs-ov-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--rs-row-hover);
  border: 1px solid var(--rs-border);
  border-radius: 50%;
  color: var(--rs-text-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.rs-ov-close:hover {
  background: var(--rs-row-active);
  color: var(--rs-text);
}
.rs-ov-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 6px 6px 14px;
}
.rs-ov-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--rs-text-2);
}
.rs-ov-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rs-ov-chip {
  font-family: var(--rs-font);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border: 1px solid var(--rs-border);
  background: transparent;
  color: var(--rs-text-2);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.rs-ov-chip span {
  font-size: 10px;
  font-weight: 700;
  color: var(--rs-text-3);
  background: var(--rs-row-hover);
  padding: 1px 6px;
  border-radius: 999px;
}
.rs-ov-chip:hover {
  background: var(--rs-row-hover);
  color: var(--rs-text);
}
.rs-ov-chip.is-on {
  background: var(--rs-accent-2);
  border-color: var(--rs-accent);
  color: var(--rs-accent);
}
.rs-ov-chip.is-on span {
  background: var(--rs-accent);
  color: #fff;
}
[data-bs-theme="dark"] .rs-ov-chip.is-on span {
  color: #0b1220;
}
.rs-ov-body {
  padding: 14px 14px 22px;
  overflow-y: auto;
  flex: 1;
}
.rs-ov-group + .rs-ov-group {
  margin-top: 26px;
}
.rs-ov-group-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--rs-border);
  margin-bottom: 6px;
}
.rs-ov-group-c {
  font-size: 12px;
  font-weight: 500;
  color: var(--rs-text-3);
  margin-left: auto;
}
.rs-ov-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rs-ov-list .rs-row {
  padding: 14px 12px;
}
/* Grouped results already carry the category in the group heading — repeating
   it on every row underneath is just noise. The dropdown keeps its pills,
   since results there are not grouped. */
.rs-ov-list .rs-row .rs-cat {
  display: none;
}

/* ============================================================
   MOBILE FULLSCREEN MODAL
   ============================================================ */
.rs-mob {
  position: fixed;
  inset: 0;
  background: var(--rs-bg-soft);
  z-index: 700;
  display: none;
  flex-direction: column;
  font-family: var(--rs-font);
}
.rs-mob.rs-open {
  display: flex;
  animation: rs-fade 0.14s ease-out;
}
.rs-mob-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--rs-border);
  background: var(--rs-bg-soft);
}
.rs-mob-back,
.rs-mob-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--rs-text);
  cursor: pointer;
  border-radius: 50%;
}
.rs-mob-back:active,
.rs-mob-clear:active {
  background: var(--rs-row-active);
}
.rs-mob-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--rs-text);
  /* 16px keeps iOS Safari from zooming the page on focus. */
  font-size: 16px;
  font-weight: 500;
  padding: 8px 4px;
  font-family: var(--rs-font);
}
.rs-mob-input::placeholder {
  color: var(--rs-text-3);
  font-weight: 400;
}
.rs-mob-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 24px;
}
.rs-mob-body .rs-ov-count {
  padding: 8px 6px 12px;
}
.rs-mob-body .rs-ov-group + .rs-ov-group {
  margin-top: 18px;
}

/* ============================================================
   BODY LOCK + LANDING PULSE
   ============================================================ */
body.rs-locked {
  overflow: hidden;
}

/* Marks the section you were sent to, so the jump is legible. */
.rs-pulse {
  position: relative;
  animation: rs-pulse-anim 2.1s ease-out forwards;
}
@keyframes rs-pulse-anim {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 125, 194, 0.5),
      inset 0 0 0 0 rgba(14, 125, 194, 0);
  }
  20% {
    box-shadow: 0 0 0 18px rgba(14, 125, 194, 0),
      inset 0 0 0 3px rgba(14, 125, 194, 0.5);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 125, 194, 0),
      inset 0 0 0 0 rgba(14, 125, 194, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rs-dd.rs-open,
  .rs-ov.rs-open,
  .rs-mob.rs-open {
    animation: none;
  }
  .rs-pulse {
    animation-duration: 0.01ms;
  }
  .rs-hs__field {
    transition: none;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .rs-dd {
    display: none !important;
  }
}
@media (max-width: 640px) {
  .rs-ov {
    padding: 0;
  }
  .rs-ov-inner {
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .rs-ov-input {
    font-size: 18px;
  }
}
