/* Pricing Simulator Styles
 *
 * The 4-step accordion cost simulator on the Pricing page. Loads alongside
 * pricing-page.css (which defines the shared tokens: --space-*, --radius-*,
 * --color-surface-card, etc.) so those are available here.
 *
 * The .lc-step* accordion rules are copied from checkout.css (the checkout
 * page's step interface) so the pricing page does not need to load all of
 * checkout.css. Keep the two in sync if the step visuals change.
 */

/* Accordion steps */
.lc-sim-steps {
    --lc-accent: var(--color-accent);
    --lc-accent-rgb: var(--color-accent-rgb);
    --lc-slash-glow: rgba(24, 182, 214, 0.55);
    --lc-slash-dim: rgba(42, 42, 42, 0.16);
    --lc-glow-strength: 1;
    display: flex;
    flex-direction: column;
    gap: calc(var(--space) * 0.875);
    max-width: none;
    margin: 0 0 var(--space-xl);
}
[data-theme="dark"] .lc-sim-steps {
    --lc-slash-glow: rgba(59, 214, 242, 0.6);
    --lc-slash-dim: rgba(255, 255, 255, 0.14);
}
.lc-step { --lc-step-accent: var(--lc-cyan); }

.lc-step__bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space);
    width: 100%;
    padding: calc(var(--space) * 0.875) calc(var(--space) * 1.15);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.04) 55%, rgba(255, 255, 255, 0.10) 100%), var(--gradient-content-card);
    border: 1px solid var(--color-border-lighter);
    border-left: 3px solid var(--color-border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--color-text-primary);
    transition: border-color 0.25s ease, box-shadow 0.3s ease, background 0.3s ease, transform 0.2s ease, opacity 0.25s ease;
}
.lc-step__bar:hover { transform: translateY(-1px); }

.lc-step__num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'SF Mono', Monaco, 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-secondary);
    background: rgba(var(--lc-accent-rgb), 0.08);
    border: 1px solid var(--color-border-lighter);
    transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.lc-step__label {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.lc-step__name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    line-height: 1.25;
    transition: color 0.25s ease;
}
.lc-step__summary {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    display: none;
}

.lc-slashes {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    padding-left: var(--space);
}
.lc-slash {
    width: 8px;
    height: 22px;
    border-radius: 2px;
    background: var(--lc-slash-dim);
    transform: skewX(-20deg);
    transition: background 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}
.lc-slash.is-lit { background: var(--lc-cyan); opacity: 0.5; }
.lc-step.is-active .lc-slash.is-lit {
    opacity: 1;
    box-shadow: 0 0 calc(9px * var(--lc-glow-strength)) var(--lc-slash-glow);
}

.lc-step.is-active > .lc-step__bar {
    border-color: var(--lc-accent);
    border-left-color: var(--lc-accent);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.03) 44%, rgba(255, 255, 255, 0.18) 100%), var(--gradient-content-card);
    box-shadow: 0 0 0 1px rgba(var(--lc-accent-rgb), 0.25), 0 8px 26px var(--color-glow);
}
[data-theme="dark"] .lc-step__bar {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.18) 0%, rgba(0, 0, 0, 0.10) 55%, rgba(255, 255, 255, 0.02) 100%), var(--gradient-content-card);
}
[data-theme="dark"] .lc-step.is-active > .lc-step__bar {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.14) 0%, rgba(0, 0, 0, 0.08) 46%, rgba(255, 255, 255, 0.03) 100%), var(--gradient-content-card);
}
.lc-step.is-active .lc-step__num {
    color: var(--color-bg-main);
    background: var(--lc-accent);
    border-color: var(--lc-accent);
    box-shadow: 0 0 calc(12px * var(--lc-glow-strength)) var(--color-glow);
}
.lc-step.is-complete > .lc-step__bar { border-left-color: var(--lc-accent); }
.lc-step.is-complete .lc-step__num {
    color: var(--lc-accent);
    border-color: rgba(var(--lc-accent-rgb), 0.4);
    background: rgba(var(--lc-accent-rgb), 0.12);
}
.lc-step.is-complete .lc-step__summary { display: block; }

.lc-step__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.lc-step__panel {
    padding: calc(var(--space) * 1.25) calc(var(--space) * 0.5) var(--space);
    display: flex;
    flex-direction: column;
    gap: var(--space);
}
@media (prefers-reduced-motion: reduce) { .lc-step__body { transition: none; } }

/* Simulate button and results heading alignment */
.lc-sim-run-row {
    max-width: none;
    margin: 0 0 var(--space-xl);
}
.lc-results-panel > .lc-h3 {
    text-align: left;
}

/* Tab panels */
.sim-tab-panel {
    display: none;
    gap: var(--space);
    align-items: start;
    padding: 0;
}
.sim-tab-panel.active {
    display: grid;
}
.sim-panel-online     { grid-template-columns: minmax(140px, 180px) minmax(140px, 200px) 1fr; }
.sim-panel-offline    { grid-template-columns: minmax(140px, 1fr) minmax(200px, 1.4fr); }
.sim-panel-forwarding { grid-template-columns: minmax(140px, 200px) 1fr; }

.sim-span { grid-column: 1 / -1; }

/* Radio mode rows (online order type, offline mode) */
.sim-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
}
.sim-radio {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    cursor: pointer;
}
.sim-radio input {
    flex-shrink: 0;
    accent-color: var(--color-accent-pressed);
    width: 16px;
    height: 16px;
}
.sim-radio span {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
}

/* Pin the label line so fee cells and field cells share one geometry */
.sim-tab-panel .field-label,
.sim-fee-label {
    display: block;
    line-height: 20px;
    margin-bottom: var(--space);
}

.sim-field-note {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin: var(--space-2xs) 0 0;
}

/* Same height as an input, label sits above like every other field */
.sim-fee-box {
    display: flex;
    align-items: center;
    height: var(--lc-button-height);
    padding: 0 var(--space);
    border: 1px dashed var(--color-border-light);
    border-radius: var(--radius-sm);
    background: var(--color-surface-card);
}
.sim-fee-box p {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    font-variant-numeric: tabular-nums;
    margin: 0;
}

@media (max-width: 640px) {
    .sim-panel-online,
    .sim-panel-offline,
    .sim-panel-forwarding {
        grid-template-columns: 1fr;
    }
}

/* Tab buttons */
.lc-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-lg);
    height: var(--lc-button-height);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-md);
    background: var(--color-surface-card);
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
    white-space: nowrap;
}
.lc-tab-btn:hover { border-color: var(--color-accent); color: var(--color-accent-pressed); }
.lc-tab-btn.active {
    border-color: var(--color-accent);
    background: var(--color-accent-faint);
    color: var(--color-accent-pressed);
    font-weight: var(--font-weight-semibold);
}

/* Service items */
.lc-svc-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space);
    border: 1px solid var(--color-border-lighter);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: var(--color-surface-card);
    transition: background var(--transition-fast);
}
.lc-svc-item:hover { background: var(--color-accent-faint); }

.lc-svc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
}
@media (max-width: 600px) {
    .lc-svc-grid { grid-template-columns: 1fr; }
}

/* Results panel */
.lc-results-panel {
    max-width: none;
    margin: var(--space-xl) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space);
}
.lc-results-panel[hidden] {
    display: none;
}
.lc-results-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: var(--space);
    border-top: 2px solid var(--color-accent);
    margin-top: var(--space-xs);
}
