/* Option sub-pages in the options book family: the trade page (open_option.html)
 * and the option calculator (users/options_input.html). Tokens come from options_book.css. */
.od-detail .od-crumb { margin: 0 0 12px; font-size: 13px; color: var(--ob-muted); }
.od-detail .od-crumb ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0; padding: 0; }
.od-detail .od-crumb li + li::before { content: "\203A"; margin-right: 8px; color: var(--ob-muted); }
.od-detail .od-crumb a { text-decoration: none; }
.od-detail .od-crumb a:hover { text-decoration: underline; }
.od-detail .od-crumb [aria-current] { color: var(--ob-text-2); }

.od-hero { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; }
.od-hero-l { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 420px; }
.od-hero .ob-tk { width: 48px; height: 48px; font-size: 13px; }
.od-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.od-detail h1.od-title { font-size: 24px; line-height: 1.15; font-weight: 650; letter-spacing: -0.02em; margin: 0; }
.od-sub { margin-top: 4px; font-size: 13.5px; color: var(--ob-text-2); overflow-wrap: anywhere; }
.od-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--ob-surface-3); color: var(--ob-text-2); }
.od-chip.open { background: var(--ob-pos-wash); color: var(--ob-pos-text); }
.od-chip.settle { background: var(--ob-warn-wash); color: var(--ob-warn-text); }
.od-chip.done { background: var(--ob-brand-wash); color: var(--ob-brand-text); }
.od-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

.od-detail .ob-kpis.od-kpis { margin-top: 18px; }
.od-detail .od-kpis.n3 { grid-template-columns: 1.3fr repeat(2, minmax(0, 1fr)); }
.od-kpi-note { font-size: 14px; line-height: 1.4; color: var(--ob-text-2); }
.od-mny { font-weight: 600; }
.od-mny.success { color: var(--ob-pos-text); }
.od-mny.danger { color: var(--ob-neg-text); }
.od-mny.warning { color: var(--ob-warn-text); }
.od-mny.secondary { color: var(--ob-text-2); }

.od-grid { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.od-grid.solo { grid-template-columns: minmax(0, 1fr); }
.od-card { background: var(--ob-surface); border: 1px solid var(--ob-border); border-radius: var(--ob-r); box-shadow: var(--ob-shadow-1); padding: 16px 18px; min-width: 0; }
.od-detail .od-card h2 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 12px; }
.od-chart { position: relative; height: 240px; }
.od-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-size: 12.5px; color: var(--ob-text-2); }

.od-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.od-grid.solo .od-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.od-facts div { min-width: 0; }
.od-facts dt { font-size: 12px; font-weight: 400; color: var(--ob-muted); line-height: 1.3; }
.od-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--ob-text); overflow-wrap: anywhere; }
.od-greeks { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ob-border); }
.od-detail .od-facts.od-gk { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 12px; }

.od-edit { margin-top: 16px; background: var(--ob-surface); border: 1px solid var(--ob-border); border-radius: var(--ob-r); box-shadow: var(--ob-shadow-1); }
.od-edit > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--ob-r); font-size: 15px; font-weight: 650; color: var(--ob-text); }
.od-edit > summary::-webkit-details-marker { display: none; }
.od-edit > summary .ob-ic { margin-left: auto; color: var(--ob-muted); transition: transform var(--ob-med) var(--ob-ease); }
.od-edit[open] > summary .ob-ic { transform: rotate(180deg); }
.od-edit > summary .mut { font-size: 12.5px; font-weight: 400; }
.od-edit-body { border-top: 1px solid var(--ob-border); padding: 16px 18px 18px; }
.od-note { font-size: 13px; color: var(--ob-text-2); margin: 0 0 14px; display: flex; gap: 8px; align-items: flex-start; }
.od-note i { margin-top: 3px; color: var(--ob-muted); }
.od-errs { color: var(--ob-neg-text); font-size: 13px; margin: 0 0 12px; }
.od-errs ul, .od-fld .errorlist { margin: 4px 0 0; padding: 0; list-style: none; color: var(--ob-neg-text); font-size: 12.5px; }
.od-fs { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.od-fs:last-of-type { margin-bottom: 8px; }
.od-detail .od-fs legend { float: none; width: auto; font-size: 12px; font-weight: 600; color: var(--ob-text-2); margin: 0 0 8px; padding: 0; }
.od-fgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.od-fld { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.od-fld.wide { grid-column: 1 / -1; }
.od-fld > label { font-size: 12.5px; color: var(--ob-text-2); margin: 0; }
.od-fld.check { flex-direction: row; align-items: center; gap: 8px; align-self: end; min-height: 38px; }
.od-fld.check input { position: static; float: none; flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--ob-brand); }
.od-fld.ro b { font-size: 14px; font-weight: 600; color: var(--ob-text); min-height: 38px; display: flex; align-items: center; overflow-wrap: anywhere; }
.od-detail .od-edit .form-control { height: 38px; padding: 6px 10px; border: 1px solid var(--ob-border-strong); border-radius: var(--ob-r-ctl); background: var(--ob-surface-2); color: var(--ob-text); font: 14px var(--ob-font); box-shadow: none; width: 100%; }
.od-detail .od-edit textarea.form-control { height: auto; min-height: 76px; }
.od-detail .od-edit .form-control:focus { border-color: var(--ob-brand); box-shadow: var(--ob-focus); outline: none; }
.od-detail .od-edit .form-control::placeholder { color: var(--ob-muted); }
.od-detail .od-edit select.form-control option { color: #0f1b2a; background: #fff; }
html.dark .od-detail .od-edit input[type="date"].form-control { color-scheme: dark; }
.od-save { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.od-save .ob-btn { height: 38px; padding: 0 18px; }

@media (max-width: 1180px) {
  .od-grid { grid-template-columns: minmax(0, 1fr); }
  .od-grid.solo .od-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .od-detail .ob-kpis.od-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .od-detail .ob-kpis.od-kpis .ob-kpi { display: flex; border-left: 0; border-top: 1px solid var(--ob-border); border-bottom: 0; }
  .od-detail .ob-kpis.od-kpis .ob-kpi:first-child { grid-column: 1 / -1; border-top: 0; }
  .od-detail .ob-kpis.od-kpis .ob-kpi:nth-child(2n) { border-right: 1px solid var(--ob-border); }
  .od-detail .ob-kpis.od-kpis.n3 .ob-kpi:nth-child(2n) { border-right: 1px solid var(--ob-border); }
  .od-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .od-detail .od-facts.od-gk { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .od-detail.ob.od-container { padding-top: 28px; }
  .od-detail h1.od-title { font-size: 21px; }
  .od-hero-l { flex-basis: 100%; }
  .od-acts { margin-left: 0; width: 100%; }
  .od-acts .ob-btn { flex: 1 1 0; justify-content: center; }
  .od-facts, .od-grid.solo .od-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .od-card, .od-edit-body { padding-left: 14px; padding-right: 14px; }
  .od-edit > summary { padding-left: 14px; padding-right: 14px; }
  .od-chart { height: 210px; }
}
@media (max-width: 440px) {
  .od-fgrid { grid-template-columns: minmax(0, 1fr); }
}
