/* OptionsGEX NSE Advanced GEX Presentation V1 */

/* Preserve V321 marker/replay side effects while removing its visual tooltip ownership. */
#gexRtHover,
#ogex-v321-tooltip,
#ogex-v331-body-tooltip,
#ogex-v331-tooltip-toggle,
#ogex-v322-oi-profile {
  display: none !important;
}

#ogex-nse-gex-tooltip-v1 {
  --pos: #4ade80;
  --neg: #fb7185;
  --warn: #fbbf24;
  --muted: #8fa4b5;
  position: fixed;
  z-index: 2147483000;
  display: none;
  width: min(360px, calc(100vw - 16px));
  max-height: min(680px, calc(100vh - 16px));
  overflow: auto;
  pointer-events: none;
  border: 1px solid rgba(109, 143, 165, .48);
  border-radius: 12px;
  background: rgba(5, 15, 23, .97);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .46);
  color: #e9f3f8;
  padding: 10px;
  font: 12px/1.35 system-ui, -apple-system, Segoe UI, sans-serif;
}

#ogex-nse-gex-tooltip-v1.show { display: block; }
#ogex-nse-gex-tooltip-v1 .pos { color: var(--pos); }
#ogex-nse-gex-tooltip-v1 .neg { color: var(--neg); }
#ogex-nse-gex-tooltip-v1 .call-wall { color: #fb7185; }
#ogex-nse-gex-tooltip-v1 .put-wall { color: #4ade80; }

.ogex-nse-v1-head,
.ogex-nse-v1-ohlc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.ogex-nse-v1-head {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(109, 143, 165, .25);
}

.ogex-nse-v1-head > span {
  color: #9fb5c3;
  font-size: 10px;
  font-weight: 800;
}

.ogex-nse-v1-ohlc {
  padding: 8px 0;
  color: #9fb5c3;
  flex-wrap: wrap;
}

.ogex-nse-v1-ohlc b { color: #f2f7fa; }

.ogex-nse-v1-grid {
  display: grid;
  grid-template-columns: minmax(105px, 1fr) minmax(100px, 1.1fr);
  gap: 5px 10px;
  align-items: baseline;
}

.ogex-nse-v1-grid > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .02em;
}

.ogex-nse-v1-grid > b {
  color: #edf6fa;
  text-align: right;
  overflow-wrap: anywhere;
}

.ogex-nse-v1-section {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(109, 143, 165, .25);
}

.ogex-nse-v1-section > strong {
  display: block;
  margin-bottom: 7px;
  color: #cfe3ed;
  font-size: 10px;
  letter-spacing: .04em;
}

.ogex-nse-v1-warning,
.ogex-nse-v1-note {
  margin-top: 8px;
  border-radius: 8px;
  padding: 7px 8px;
}

.ogex-nse-v1-warning {
  border: 1px solid rgba(251, 191, 36, .32);
  background: rgba(251, 191, 36, .08);
  color: #fcd96b;
}

.ogex-nse-v1-note {
  background: rgba(93, 119, 137, .10);
  color: #9fb5c3;
}

#ogex-nse-gex-tooltip-mode-v1 {
  position: absolute;
  top: 10px;
  right: 258px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(94, 123, 141, .38);
  border-radius: 9px;
  background: rgba(5, 15, 23, .86);
}

#ogex-nse-gex-tooltip-mode-v1 > span {
  padding: 0 4px;
  color: #8198a8;
  font-size: 9px;
  font-weight: 800;
}

#ogex-nse-gex-tooltip-mode-v1 button {
  min-height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8da2b2;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

#ogex-nse-gex-tooltip-mode-v1 button.active {
  background: rgba(36, 183, 116, .16);
  color: #74e4ab;
}

#ogex-nse-oi-profile-v1 {
  position: absolute;
  z-index: 48;
  top: 34px;
  right: 5px;
  bottom: 30px;
  width: 228px;
  display: none;
  pointer-events: none;
  color: #dbeaf1;
}

#ogex-nse-oi-profile-v1.ready { display: block; }

#ogex-nse-oi-profile-v1 .head,
#ogex-nse-oi-profile-v1 .row {
  display: grid;
  grid-template-columns: 1fr 70px 1fr;
  align-items: center;
}

#ogex-nse-oi-profile-v1 .head {
  height: 24px;
  border-radius: 7px;
  background: rgba(4, 13, 20, .82);
  color: #8ea5b5;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

#ogex-nse-oi-profile-v1 .rows {
  position: absolute;
  inset: 26px 0 18px;
}

#ogex-nse-oi-profile-v1 .row {
  position: absolute;
  left: 0;
  right: 0;
  height: 16px;
  border-radius: 4px;
  background: rgba(5, 15, 23, .43);
  font-size: 9px;
}

#ogex-nse-oi-profile-v1 .call,
#ogex-nse-oi-profile-v1 .put {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  height: 100%;
}

#ogex-nse-oi-profile-v1 .call { justify-content: flex-end; }
#ogex-nse-oi-profile-v1 .put { justify-content: flex-start; }

#ogex-nse-oi-profile-v1 .call i,
#ogex-nse-oi-profile-v1 .put i {
  position: absolute;
  top: 2px;
  bottom: 2px;
  opacity: .28;
  border-radius: 3px;
}

#ogex-nse-oi-profile-v1 .call i { right: 0; background: #fb7185; }
#ogex-nse-oi-profile-v1 .put i { left: 0; background: #4ade80; }

#ogex-nse-oi-profile-v1 .call span,
#ogex-nse-oi-profile-v1 .put span {
  position: relative;
  z-index: 2;
  padding: 0 3px;
}

#ogex-nse-oi-profile-v1 .strike {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  color: #e7f1f6;
}

#ogex-nse-oi-profile-v1 .strike em {
  font-style: normal;
  font-size: 8px;
  font-weight: 900;
}

#ogex-nse-oi-profile-v1 .row.call-wall .strike { color: #fb7185; }
#ogex-nse-oi-profile-v1 .row.put-wall .strike { color: #4ade80; }
#ogex-nse-oi-profile-v1 .row.atm .strike { background: rgba(255, 191, 36, .16); border-radius: 4px; }

#ogex-nse-oi-profile-v1 .note {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  color: #78909f;
  font-size: 8px;
  font-weight: 750;
}

@media (max-width: 1100px) {
  #ogex-nse-oi-profile-v1 { width: 205px; }
  #ogex-nse-gex-tooltip-mode-v1 { right: 232px; }
}

@media (max-width: 820px) {
  #ogex-nse-oi-profile-v1 { display: none !important; }
  #ogex-nse-gex-tooltip-mode-v1 { right: 8px; top: 8px; }
  #ogex-nse-gex-tooltip-v1 {
    width: min(340px, calc(100vw - 12px));
    max-height: min(72vh, 620px);
    padding: 9px;
  }
}
