/* ════════════════════════════════════════════════════════════════════════════
   RECATOOLS — Profit Margin Calculator — style.css  |  RT-FIN-013
   Tool-specific overrides only.
   Base styles live in /assets/css/tool-page.css.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Mode tab strip ──────────────────────────────────────────────────────── */
.pm-tabs {
    display:       flex;
    gap:           4px;
    background:    #f0efec;
    border-radius: 999px;
    padding:       4px;
    width:         fit-content;
    margin-bottom: 28px;
    flex-wrap:     wrap;
}

.pm-tab-btn {
    padding:       9px 20px;
    border:        none;
    border-radius: 999px;
    font-family:   'IBM Plex Sans', sans-serif;
    font-size:     0.9rem;
    font-weight:   600;
    cursor:        pointer;
    color:         #64748B;
    background:    transparent;
    transition:    background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    white-space:   nowrap;
}

.pm-tab-btn.active {
    background:  #E8472F;
    color:       #ffffff;
    box-shadow:  0 2px 8px rgba(232, 98, 42, 0.30);
}

.pm-tab-btn:not(.active):hover {
    background: #e9e8e4;
    color:      #0D1B2A;
}

/* ── Input group ─────────────────────────────────────────────────────────── */
.pm-input-group {
    margin-bottom: 20px;
}

.pm-input-group label {
    display:       block;
    font-size:     0.875rem;
    font-weight:   600;
    color:         #0D1B2A;
    margin-bottom: 6px;
}

.pm-input-wrap {
    position: relative;
    display:  flex;
    align-items: center;
}

.pm-currency-prefix {
    position:       absolute;
    left:           16px;
    font-family:    'IBM Plex Serif', serif;
    font-size:      1.375rem;
    color:          #64748B;
    pointer-events: none;
    user-select:    none;
}

.pm-input {
    width:          100%;
    padding:        14px 14px 14px 42px;
    font-family:    'IBM Plex Serif', serif;
    font-size:      1.5rem;
    font-weight:    400;
    color:          #0D1B2A;
    background:     #ffffff;
    border:         2px solid #E2E4E8;
    border-radius:  12px;
    outline:        none;
    transition:     border-color 0.18s ease, box-shadow 0.18s ease;
    -webkit-appearance: none;
    appearance:     none;
}

.pm-input:focus {
    border-color: #E8472F;
    box-shadow:   0 0 0 4px rgba(232, 98, 42, 0.12);
}

.pm-input::placeholder { color: #c5c2bc; }

.pm-input::-webkit-outer-spin-button,
.pm-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Markup: percentage input (no currency prefix) */
.pm-input.no-prefix {
    padding-left: 16px;
}

/* ── Results panel ───────────────────────────────────────────────────────── */
.pm-results {
    background:    #FFFFFF;
    border-radius: 14px;
    padding:       24px 28px;
    margin-top:    8px;
    margin-bottom: 12px;
}

.pm-result-primary {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    margin-bottom:   16px;
    gap:             12px;
    flex-wrap:       wrap;
}

.pm-result-primary-label {
    font-size:   0.9375rem;
    font-weight: 600;
    color:       #64748B;
}

.pm-result-primary-value {
    font-family: 'IBM Plex Serif', serif;
    font-size:   2.25rem;
    font-weight: 400;
    color:       #E8472F;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.pm-result-primary-value.result-negative {
    color: #d32f2f;
}

.pm-result-secondary {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         10px 0;
    border-top:      1px solid #E2E4E8;
    gap:             8px;
}

.pm-result-secondary:not(:last-of-type) {
    border-bottom: none;
}

.pm-result-sec-label {
    font-size:   0.9375rem;
    font-weight: 500;
    color:       #64748B;
}

.pm-result-sec-value {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size:   1.125rem;
    font-weight: 700;
    color:       #0D1B2A;
    font-variant-numeric: tabular-nums;
}

.pm-result-sec-value.result-negative {
    color: #d32f2f;
}

/* ── Formula line ────────────────────────────────────────────────────────── */
.pm-formula-line {
    display:     block;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size:   0.8125rem;
    font-weight: 500;
    color:       #64748B;
    background:  #f0efec;
    border-left: 3px solid #E8472F;
    border-radius: 0 6px 6px 0;
    padding:     10px 14px;
    margin-top:  12px;
    line-height: 1.55;
    word-break:  break-word;
    font-variant-numeric: tabular-nums;
}

/* ── Margin health indicator ─────────────────────────────────────────────── */
.margin-health-indicator {
    display:       flex;
    align-items:   center;
    gap:           8px;
    padding:       10px 16px;
    border-radius: 8px;
    font-size:     0.9375rem;
    font-weight:   600;
    margin-top:    12px;
}

.margin-health-indicator.health-red {
    background: #fdecea;
    color:      #c62828;
}

.margin-health-indicator.health-amber {
    background: #fff8e1;
    color:      #e65100;
}

.margin-health-indicator.health-green {
    background: #e8f5e9;
    color:      #2e7d32;
}

/* ── Markup reverse toggle ───────────────────────────────────────────────── */
#markup-reverse-toggle {
    display:       inline-flex;
    align-items:   center;
    gap:           6px;
    padding:       8px 16px;
    font-family:   'IBM Plex Sans', sans-serif;
    font-size:     0.875rem;
    font-weight:   600;
    color:         #E8472F;
    background:    #fff5f0;
    border:        1.5px solid #f5c4aa;
    border-radius: 999px;
    cursor:        pointer;
    transition:    background 0.15s ease, border-color 0.15s ease;
    margin-bottom: 20px;
}

#markup-reverse-toggle:hover {
    background:    #ffe8d8;
    border-color:  #E8472F;
}

/* ── GST panel ───────────────────────────────────────────────────────────── */
.pm-gst-panel {
    background:    #FFFFFF;
    border:        1.5px dashed #d8d6d0;
    border-radius: 10px;
    padding:       16px 20px;
    margin-top:    16px;
}

.pm-gst-toggle-row {
    display:     flex;
    align-items: center;
    gap:         10px;
    margin-bottom: 4px;
    cursor:      pointer;
}

.pm-gst-toggle-row input[type="checkbox"] {
    width:  18px;
    height: 18px;
    accent-color: #E8472F;
    cursor: pointer;
    flex-shrink: 0;
}

.pm-gst-toggle-label {
    font-size:   0.9375rem;
    font-weight: 600;
    color:       #0D1B2A;
    cursor:      pointer;
    user-select: none;
}

.pm-gst-result-rows {
    margin-top: 12px;
}

.pm-gst-result-row {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         6px 0;
    border-bottom:   1px solid #E2E4E8;
    font-size:       0.9375rem;
}

.pm-gst-result-row:last-child { border-bottom: none; }

.pm-gst-result-label { color: #64748B; font-weight: 500; }

.pm-gst-result-value {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    color:       #0D1B2A;
    font-variant-numeric: tabular-nums;
}

.pm-gst-result-row.gst-inc-row .pm-gst-result-value {
    color:     #E8472F;
    font-size: 1.0625rem;
}

/* ── Pull quote (educational section) ───────────────────────────────────── */
.pull-quote {
    border-left:   4px solid #E8472F;
    margin:        28px 0;
    padding:       16px 24px;
    background:    #fff5f0;
    border-radius: 0 10px 10px 0;
}

.pull-quote p {
    font-family: 'IBM Plex Serif', serif;
    font-size:   1.1875rem;
    font-style:  italic;
    color:       #0D1B2A;
    margin:      0;
    line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .pm-tabs {
        border-radius: 14px;
        padding:       4px;
        width:         100%;
        justify-content: stretch;
    }

    .pm-tab-btn {
        flex: 1;
        text-align: center;
        padding:    8px 10px;
        font-size:  0.8125rem;
    }

    .pm-input {
        font-size: 1.25rem;
    }

    .pm-result-primary-value {
        font-size: 1.75rem;
    }

    .pm-results {
        padding: 18px 16px;
    }
}

/* cache-buster: 2026-05-24T05:06:05Z */
