/* Options delta/strategy analyzer, shared by the Options page and the
   watchlist's per-symbol modal. */
.options-page {
    max-width: 1120px;
    text-align: left;
    color: #0f172a;
}

/* The shared .page-heading rule centers a 560px block, which leaves the title
   floating in the middle of this much wider page. */
.options-page .page-heading {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}

.options-summary {
    max-width: 860px;
    margin: 0 0 20px;
    color: #1e293b;
    font-size: 1.02rem;
    line-height: 1.6;
    text-align: left;
}

.options-summary-details {
    max-width: 860px;
    margin: -12px 0 18px;
    color: #475569;
    font-size: .9rem;
}
.options-summary-details > summary { cursor: pointer; font-weight: 650; }

.options-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 14px;
}

.options-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
    margin-bottom: 0;
    text-align: left;
}

.options-field > span {
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Keep every control the same height so the field labels above them line up
   across the row, including the ticker box nested in a .search-input wrapper. */
.options-field select,
.options-field input {
    box-sizing: border-box;
    height: 42px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #cbd5f5;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
}

.options-action-field {
    min-width: 0;
}

.options-action-field .action-button {
    box-sizing: border-box;
    height: 42px;
    margin: 0;
    padding: 0 22px;
}

.options-field .search-input {
    display: block;
}

.options-field .search-input input {
    width: 100%;
    padding-right: 34px;
}

.options-status {
    margin: 0 0 18px;
    color: #334155;
    font-size: 0.95rem;
    text-align: left;
}

.options-results {
    text-align: left;
}

.options-results h4,
.options-breakdown-dialog h4 {
    margin: 26px 0 10px;
    color: #0f172a;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.options-result-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.35rem;
}

.options-result-header .options-contract-subtitle {
    margin: 4px 0 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
}

.options-contract-summary {
    margin: 16px 0 4px;
    padding: 12px 0;
    border-block: 1px solid #bfdbfe;
}

.options-contract-summary h4 {
    margin: 0 0 6px;
}

.options-contract-summary p {
    margin: 0;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.55;
}

.options-contract-summary .options-summary-caveat {
    margin-top: 8px;
    color: #64748b;
    font-size: 0.82rem;
}

.options-contract-summary .options-summary-narrative {
    margin-top: 10px;
    color: #1e293b;
    font-size: 0.97rem;
    line-height: 1.6;
}

.options-metric-grid.options-summary-metrics {
    margin: 10px 0 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
}

.options-summary-metrics > div {
    padding: 10px 12px;
    border-radius: 6px;
}

.options-summary-metrics span {
    font-size: 1rem;
}

.options-breakdown-toggle {
    margin: 12px 0 2px;
    padding: 8px 12px;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.options-breakdown-toggle:hover {
    background: #f1f5f9;
}

.options-breakdown[hidden] {
    display: none;
}

/* Chrome comes from the shared .modal-surface rule in modals.css. */
/* Layout only; the navy band, sticky behaviour and full-bleed margins come
   from the shared `.modal-bar` rule in modals.css. */
.options-breakdown-dialog-header {
    justify-content: space-between;
}

.options-breakdown-dialog-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.1rem;
}

/* Matches the shared .modal-close look; it stays inside the sticky header so
   it remains reachable while the dialog body scrolls. */
.options-breakdown-close {
    position: absolute;
    top: 8px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2937;
    font: 28px/1 sans-serif;
    cursor: pointer;
}

.options-breakdown-close:hover {
    color: #b42318;
}

.options-legs {
    width: 100%;
    margin-top: 16px;
    border-collapse: collapse;
    font-size: 0.93rem;
}

.options-legs th {
    padding: 8px 10px;
    border-bottom: 2px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
}

.options-legs td {
    padding: 9px 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
}

.options-legs td:first-child {
    font-weight: 700;
}

.options-assignment {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    background: #fffbeb;
    color: #78350f;
    font-size: 0.92rem;
    line-height: 1.5;
    text-align: left;
}

.options-assignment-low {
    border-left-color: #94a3b8;
    background: #f8fafc;
    color: #334155;
}

.options-assignment-high {
    border-left-color: #dc2626;
    background: #fef2f2;
    color: #7f1d1d;
}

.options-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.options-metric-grid > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
}

.options-metric-grid strong {
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.options-metric-grid span {
    color: #0f172a;
    font-size: 1.12rem;
    font-weight: 700;
}

.options-lookback {
    margin: 0 0 12px;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}

.options-disclaimer {
    margin: 22px 0 0;
    padding: 12px 14px;
    border-left: 3px solid #cbd5f5;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.5;
    text-align: left;
}

/* Chrome comes from the shared .modal-surface rule in modals.css. */
.options-modal-content {
    color: #0f172a;
    text-align: left;
}

.options-modal-content h2 {
    margin: 0 0 6px;
    padding-right: 36px;
    font-size: 1.5rem;
}

@media (max-width: 720px) {
    .options-form {
        flex-direction: column;
        align-items: stretch;
    }

    .options-field {
        min-width: 0;
    }

    .options-legs {
        display: block;
        overflow-x: auto;
    }
}
