/*
 * RECATOOLS — Discount Calculator  |  RT-FIN-012
 * Tool-specific styles only.
 * Global styles live in /assets/css/tool-page.css
 */

/* ─── Mode tab bar ──────────────────────────────────────────────────────── */
.mode-tabs {
    display: flex;
    gap: 6px;
    background: #f0efec;
    border-radius: 999px;
    padding: 4px;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.mode-tab {
    padding: 9px 20px;
    border: none;
    border-radius: 999px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9375rem;
    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;
    line-height: 1.2;
}

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

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

/* ─── Tab panels ─────────────────────────────────────────────────────────── */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

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

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

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

.input-suffix {
    position: absolute;
    right: 16px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #64748B;
    pointer-events: none;
    user-select: none;
}

.price-input {
    width: 100%;
    padding: 14px 48px 14px 42px;
    font-family: 'IBM Plex Serif', serif;
    font-size: 1.75rem;
    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;
}

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

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

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

/* Percentage input — narrower, right-aligned */
.pct-input {
    width: 100%;
    padding: 13px 42px 13px 16px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    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;
    text-align: left;
}

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

.pct-input::placeholder {
    color: #c5c2bc;
    font-weight: 400;
}

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

/* ─── Result display ─────────────────────────────────────────────────────── */
.result-display {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 22px 24px 20px;
    margin: 20px 0 14px;
}

.result-primary {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

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

.result-primary-value {
    font-family: 'IBM Plex Serif', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: #E8472F;
    line-height: 1;
}

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

.result-secondary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-secondary-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.result-secondary-value {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #0D1B2A;
}

/* ─── Formula line ───────────────────────────────────────────────────────── */
.formula-line {
    display: block;
    font-family: 'IBM Plex Sans', monospace;
    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: 0;
    line-height: 1.6;
    min-height: 36px;
    font-variant-numeric: tabular-nums;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ─── Clear row ──────────────────────────────────────────────────────────── */
.clear-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.clear-btn {
    background: none;
    border: 1.5px solid #E2E4E8;
    border-radius: 8px;
    padding: 6px 16px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.clear-btn:hover {
    border-color: #c5c2bc;
    background: #FFFFFF;
    color: #0D1B2A;
}

/* ─── Stacked discount breakdown ─────────────────────────────────────────── */
.stack-breakdown {
    margin: 12px 0;
    padding: 14px 18px;
    background: #f0efec;
    border-radius: 10px;
    font-size: 0.875rem;
    font-family: 'IBM Plex Sans', monospace;
    font-weight: 500;
    color: #0D1B2A;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.stack-breakdown.hidden {
    display: none;
}

/* ─── Amber warning (stacked discounts) ─────────────────────────────────── */
.warning-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #f9c74f;
    border-left: 4px solid #f9c74f;
    border-radius: 0 10px 10px 0;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 0.875rem;
    color: #78350f;
    line-height: 1.5;
}

.warning-note-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ─── GST panel ──────────────────────────────────────────────────────────── */
.gst-panel {
    background: #FFFFFF;
    border: 1.5px solid #E2E4E8;
    border-radius: 14px;
    padding: 18px 22px 16px;
    margin-top: 20px;
}

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

.gst-toggle-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #E8472F;
    cursor: pointer;
    flex-shrink: 0;
}

.gst-toggle-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0D1B2A;
    cursor: pointer;
    user-select: none;
}

.gst-results {
    display: none;
    flex-direction: column;
    gap: 6px;
}

.gst-results.visible {
    display: flex;
}

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

.gst-result-row:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.gst-result-row.gst-total-row {
    padding-top: 10px;
    border-top: 2px solid #E2E4E8;
    border-bottom: none;
    margin-top: 4px;
}

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

.gst-result-value {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #0D1B2A;
}

.gst-result-row.gst-total-row .gst-result-label {
    font-weight: 700;
    color: #0D1B2A;
    font-size: 1rem;
}

.gst-result-row.gst-total-row .gst-result-value {
    font-family: 'IBM Plex Serif', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #E8472F;
}

/* ─── Optional input hint ────────────────────────────────────────────────── */
.input-hint {
    display: block;
    font-size: 0.8125rem;
    color: #64748B;
    margin-top: 5px;
    font-style: italic;
}

/* ─── Educational pull-quote ─────────────────────────────────────────────── */
.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: 540px) {
    .mode-tabs {
        gap: 4px;
        padding: 3px;
    }

    .mode-tab {
        padding: 7px 13px;
        font-size: 0.8125rem;
    }

    .price-input {
        font-size: 1.4rem;
        padding: 12px 42px 12px 38px;
    }

    .input-prefix {
        font-size: 1.15rem;
        left: 13px;
    }

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

    .gst-panel {
        padding: 16px 16px 14px;
    }

    .result-display {
        padding: 18px 16px;
    }
}

@media (max-width: 380px) {
    .mode-tab {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

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

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