/* Miles Per Hour Calculator — Plugin Styles */

.mph-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    color: #0f172a;
    box-sizing: border-box;
}
.mph-wrap *, .mph-wrap *::before, .mph-wrap *::after { box-sizing: border-box; }

/* ── Header ── */
.mph__header { text-align: center; margin-bottom: 24px; }
.mph__header h2 {
    font-size: 26px !important; font-weight: 800 !important; color: #0f172a !important;
    margin: 0 0 8px 0 !important; letter-spacing: -0.02em; line-height: 1.25;
}
.mph__header p { color: #64748b; font-size: 14px; margin: 0; line-height: 1.6; }

/* ── Body Card ── */
.mph__body {
    background: #fff; border: 1.5px solid #fed7aa; border-radius: 16px;
    overflow: hidden; box-shadow: 0 1px 6px rgba(234,88,12,0.08); margin-bottom: 20px;
}

/* ── Tabs ── */
.mph__tabs { display: flex; border-bottom: 1.5px solid #fed7aa; background: #fff7ed; }
.mph__tab {
    flex: 1; padding: 12px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
    border: none; border-bottom: 2.5px solid transparent; background: transparent;
    color: #78350f; transition: all 0.15s; font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 5px;
}
.mph__tab--active { background: #fff; color: #ea580c; border-bottom-color: #ea580c; }
.mph__tab:hover:not(.mph__tab--active) { background: #fef3c7; color: #92400e; }
.mph__tab-icon { font-size: 10px; }

/* ── Mode description ── */
.mph__mode-desc {
    padding: 10px 24px 0;
    display: flex; align-items: center; gap: 8px;
}
.mph__formula-badge {
    display: inline-block; background: #fff7ed; border: 1.5px solid #fed7aa;
    color: #c2410c; font-family: 'Courier New', monospace; font-size: 13px;
    font-weight: 700; padding: 5px 14px; border-radius: 8px;
}

/* ── Presets ── */
.mph__presets-section { padding: 14px 24px 0; }
.mph__presets-label {
    display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: #94a3b8; margin-bottom: 8px;
}
.mph__presets { display: flex; flex-wrap: wrap; gap: 6px; }
.mph__preset {
    padding: 5px 11px; border-radius: 6px; border: 1.5px solid #fed7aa;
    background: #fff7ed; color: #92400e; font-size: 11.5px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: all 0.15s; line-height: 1.3;
}
.mph__preset:hover { border-color: #fb923c; background: #ffedd5; color: #c2410c; }
.mph__preset.mph--active { border-color: #ea580c; background: #ffedd5; color: #ea580c; }

/* ── Inputs ── */
.mph__inputs {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
    gap: 14px; padding: 18px 24px 0;
}
.mph__col-label {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 8px;
}
.mph__col-badge {
    width: 22px; height: 22px; border-radius: 50%; background: #ffedd5; color: #c2410c;
    font-size: 11px; font-weight: 800; display: inline-flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.mph__inputs-divider {
    font-size: 18px; font-weight: 700; color: #cbd5e1;
    text-align: center; padding-bottom: 8px; align-self: end; margin-bottom: 4px;
}
.mph__input-row { display: flex; gap: 0; }
.mph__input {
    flex: 1; padding: 11px 14px; font-size: 15px;
    font-family: 'Courier New', Courier, monospace; border: 1.5px solid #cbd5e1;
    border-right: none; border-radius: 10px 0 0 10px; background: #f8fafc;
    color: #0f172a; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield; min-width: 0;
}
.mph__input::-webkit-outer-spin-button,
.mph__input::-webkit-inner-spin-button { -webkit-appearance: none; }
.mph__input:focus { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,0.12); background: #fff; z-index: 1; position: relative; }
.mph__unit {
    padding: 0 12px; background: #f1f5f9; border: 1.5px solid #cbd5e1;
    border-radius: 0 10px 10px 0; font-size: 12px; font-weight: 700;
    color: #64748b; display: flex; align-items: center; white-space: nowrap;
}
.mph__select {
    padding: 0 8px; background: #f1f5f9; border: 1.5px solid #cbd5e1;
    border-radius: 0 10px 10px 0; font-size: 12px; font-weight: 700;
    color: #475569; cursor: pointer; outline: none; font-family: inherit;
    appearance: none; -webkit-appearance: none; text-align: center; min-width: 52px;
}
.mph__select:focus { border-color: #f97316; background: #fff; }

/* ── Action row ── */
.mph__action { padding: 14px 24px 18px; display: flex; flex-direction: column; gap: 6px; }
.mph__btn {
    align-self: flex-start; padding: 11px 32px;
    background: linear-gradient(135deg, #f97316, #ea580c); color: #fff;
    border: none; border-radius: 10px; font-size: 14px; font-weight: 700;
    cursor: pointer; font-family: inherit; transition: opacity 0.15s;
    box-shadow: 0 2px 8px rgba(234,88,12,0.25);
}
.mph__btn:hover { opacity: 0.9; }
.mph__error { margin: 0; font-size: 13px; color: #ef4444; }

/* ── Result bar ── */
.mph__result-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    background: #fff7ed; border-top: 1.5px solid #fed7aa;
    border-bottom: 1.5px solid #fed7aa; padding: 12px 24px;
}
.mph__result-label {
    font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; color: #c2410c;
}
.mph__result-value {
    font-family: 'Courier New', monospace; font-size: 16px;
    font-weight: 900; color: #ea580c;
}
.mph__verify-badge {
    margin-left: auto; background: #dcfce7; color: #15803d;
    font-size: 11px; font-weight: 800; border-radius: 20px;
    padding: 3px 10px; letter-spacing: 0.5px;
}

/* ── Steps Panels ── */
.mph__steps-wrap { padding: 20px 24px 0; }
.mph__steps-panel { border: 1.5px solid; border-radius: 12px; overflow: hidden; }
.mph__steps-panel--fwd { border-color: #fed7aa; }
.mph__steps-panel--rev { border-color: #bfdbfe; }

.mph__steps-header { padding: 10px 18px; font-weight: 800; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
.mph__steps-header--fwd { background: #fff7ed; color: #c2410c; border-bottom: 1.5px solid #fed7aa; }
.mph__steps-header--rev { background: #eff6ff; color: #1e40af; border-bottom: 1.5px solid #bfdbfe; }

/* ── Step Item ── */
.mph__step { padding: 14px 18px; border-bottom: 1px solid #f8fafc; }
.mph__step:last-child { border-bottom: none; }

.mph__stp-label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mph__stp-num {
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.mph__steps-panel--fwd .mph__stp-num { background: #ffedd5; color: #c2410c; }
.mph__steps-panel--rev .mph__stp-num { background: #dbeafe; color: #1e40af; }
.mph__stp-label { font-size: 13px; font-weight: 600; color: #334155; }

.mph__stp-formula {
    font-size: 12px; font-style: italic; color: #64748b; background: #f1f5f9;
    border-radius: 6px; padding: 4px 10px; margin-bottom: 8px;
    display: inline-block; font-family: 'Courier New', Courier, monospace;
}
.mph__stp-calc { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 13px; }
.mph__stp-val  { font-weight: 600; color: #334155; }
.mph__stp-eq   { font-weight: 400; color: #94a3b8; }
.mph__stp-arrow { color: #94a3b8; }

.mph__stp-result { font-size: 13px; font-weight: 900; padding: 4px 12px; border-radius: 20px; display: inline-block; }
.mph__steps-panel--fwd .mph__stp-result { background: #ffedd5; color: #c2410c; }
.mph__steps-panel--rev .mph__stp-result { background: #dbeafe; color: #1e40af; }

.mph__stp-result--final { font-size: 15px; padding: 6px 18px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.mph__steps-panel--fwd .mph__stp-result--final { background: linear-gradient(90deg, #ea580c, #f97316); color: #fff; }
.mph__steps-panel--rev .mph__stp-result--final { background: linear-gradient(90deg, #1d4ed8, #3b82f6); color: #fff; }

/* ── Divider ── */
.mph__steps-divider {
    display: flex; align-items: center; gap: 12px;
    background: #f1f5f9; padding: 10px 20px;
    border-top: 1.5px solid #e2e8f0; border-bottom: 1.5px solid #e2e8f0;
    margin: 20px 0 0;
}
.mph__steps-divider::before, .mph__steps-divider::after { content: ''; flex: 1; height: 1px; background: #cbd5e1; }
.mph__steps-divider span { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #1d4ed8; white-space: nowrap; }
#mph-rev-wrap { padding-bottom: 20px; }

/* ── About ── */
.mph__about {
    background: #fff; border: 1.5px solid #e2e8f0; border-radius: 16px;
    padding: 22px 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.mph__about h3 { font-size: 16px !important; font-weight: 700 !important; color: #0f172a !important; margin: 0 0 10px !important; }
.mph__about p { font-size: 13px; color: #64748b; line-height: 1.65; margin: 0 0 0; }
.mph__formula-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 14px 0 0; }
.mph__formula-item {
    border-radius: 10px; padding: 12px 14px; border: 1px solid;
    display: flex; flex-direction: column; gap: 3px;
}
.mph__formula-item--orange { background: #fff7ed; border-color: #fed7aa; }
.mph__formula-item--blue   { background: #eff6ff; border-color: #bfdbfe; }
.mph__formula-item--green  { background: #f0fdf4; border-color: #bbf7d0; }
.mph__fi-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.mph__formula-item--orange .mph__fi-label { color: #c2410c; }
.mph__formula-item--blue   .mph__fi-label { color: #1e40af; }
.mph__formula-item--green  .mph__fi-label { color: #15803d; }
.mph__fi-eq { font-family: 'Courier New', monospace; font-size: 12px; font-weight: 700; color: #334155; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .mph__inputs { grid-template-columns: 1fr; }
    .mph__inputs-divider { display: none; }
    .mph__formula-grid { grid-template-columns: 1fr; }
    .mph__tabs { font-size: 11px; }
}
