/* ==========================================================================
   Options DTE Module - Matches Exact Site Design & Typography
   Path: public/modules_dev/options_dte/options_dte.css
   ========================================================================== */

/* ── Popup Panel ── */
#desk-dte-popup {
  width: 355px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Open Sans", system-ui, sans-serif;
}

/* ── Popup Header with Info Dot ── */
.desk-dte-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.desk-dte-title-row .desk-nav-popup-title {
  margin-bottom: 0;
}

.desk-dte-info-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.desk-dte-info-dot {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.desk-dte-info-dot:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
}

.desk-dte-info-popover {
  position: absolute;
  top: 24px;
  right: 0;
  width: 275px;
  background: #161618;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.92);
  z-index: 10060;
  display: none;
  font-size: 11px;
  line-height: 1.45;
  color: #cbd5e1;
  pointer-events: auto;
}

.desk-dte-info-wrapper:hover .desk-dte-info-popover,
.desk-dte-info-popover.visible {
  display: block;
}

.desk-dte-info-popover-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 11.5px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
}

.desk-dte-info-popover p {
  margin-bottom: 6px;
}

.desk-dte-info-popover p:last-child {
  margin-bottom: 0;
}

.desk-dte-info-popover b {
  color: #ffffff;
}

/* ── Section Dividers & Headings ── */
.desk-dte-group-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin: 5px 0 6px 0;
  letter-spacing: 0.02em;
}

.desk-dte-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 9px 0 8px 0;
}

/* ── Rows & Pills (Exact match to desk-tf layout) ── */
.desk-dte-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.desk-dte-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  min-width: 44px;
}

.desk-dte-pills {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: nowrap;
}

.desk-dte-pill {
  flex: 1;
  padding: 6px 0;
  text-align: center;
  background: #202024;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  min-width: 0;
}

.desk-dte-pill:hover {
  background: #2a2a2e;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.desk-dte-pill.active {
  background: rgba(0, 255, 136, 0.16);
  border-color: #00ff88;
  color: #00ff88;
}

/* ── Apply Button (Matches .desk-btn-apply exactly) ── */
.desk-dte-apply-btn {
  margin-top: 10px;
  background: #00d659;
  color: #000000;
  font-weight: 700;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  padding: 7px 0;
  width: 100%;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: center;
  user-select: none;
}

.desk-dte-apply-btn:hover {
  background: #00ff6a;
}

/* ── Nascondi Orizzonte Passato in modalità Backtest ── */
#desk-dte-popup.backtest-mode-on #desk-dte-past-section,
.desk-dte-past-section.hidden {
  display: none !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   APPLE UI OVERHAUL: OPTIONS DTE GLASS CARD BORDERS & OPAQUE TABS
   ═══════════════════════════════════════════════════════════════════════════ */

#desk-dte-popup {
  background: rgba(20, 20, 23, 0.96) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  border-top: 1.5px solid rgba(255, 255, 255, 0.22) !important;
  border-left: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: inset 1px 1px 0 0 rgba(255, 255, 255, 0.12), 0 16px 48px rgba(0, 0, 0, 0.85) !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", system-ui, sans-serif !important;
}

.desk-dte-pill {
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.11) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.desk-dte-pill.active {
  background: rgba(42, 42, 48, 0.92) !important;
  border-top: 1.5px solid rgba(255, 255, 255, 0.24) !important;
  border-left: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  box-shadow: inset 1px 1px 0 0 rgba(255, 255, 255, 0.1) !important;
}

.desk-dte-apply-btn {
  margin-top: 10px !important;
  background: rgba(36, 36, 40, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: #f1f5f9 !important;
  border-top: 1.5px solid rgba(255, 255, 255, 0.22) !important;
  border-left: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  padding: 7px 0 !important;
  width: 100% !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  text-align: center !important;
  user-select: none !important;
  box-shadow: inset 1px 1px 0 0 rgba(255, 255, 255, 0.1), 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

.desk-dte-apply-btn:hover {
  background: rgba(48, 48, 54, 0.96) !important;
  border-top-color: rgba(255, 255, 255, 0.32) !important;
  border-left-color: rgba(255, 255, 255, 0.26) !important;
  color: #ffffff !important;
}

.desk-dte-info-popover {
  background: rgba(20, 20, 23, 0.96) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  border-top: 1.5px solid rgba(255, 255, 255, 0.22) !important;
  border-left: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  box-shadow: inset 1px 1px 0 0 rgba(255, 255, 255, 0.12), 0 16px 48px rgba(0, 0, 0, 0.85) !important;
}

/* Typography & Size adjustments for Options DTE ("un filo più grandi") */
.desk-dte-section-title {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, 0.55) !important;
}

.desk-dte-pill,
.backtest-dur-pill {
  font-size: 11.5px !important;
  background: rgba(30, 30, 34, 0.85) !important;
}

.desk-dte-pill.active,
.backtest-dur-pill.active {
  background: rgba(44, 44, 50, 0.95) !important;
}

.desk-dte-select {
  font-size: 12px !important;
  background: rgba(28, 28, 32, 0.95) !important;
}

.desk-dte-apply-btn {
  font-size: 12.5px !important;
  font-weight: 700 !important;
}
