/* =========================================================
   DIXANI — PROFIT MARGIN CALCULATOR
   ========================================================= */


/* ===== CALCULATOR WRAPPER ===== */

.calculator-shell {
    max-width: 1120px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}


/* ===== MODE TABS ===== */

.calculator-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.calc-tab {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 18px 22px;

    font: inherit;
    font-weight: 700;
    font-size: 15px;

    color: #64748b;
    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease,
        box-shadow .2s ease;
}

.calc-tab:hover {
    color: #2563eb;
    background: #eff6ff;
}

.calc-tab.active {
    color: #2563eb;
    background: #ffffff;
    box-shadow: inset 0 -3px 0 #2563eb;
}


/* ===== MAIN GRID ===== */

.calculator-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}


/* ===== PANELS ===== */

.calculator-panel {
    padding: 34px;
}

.input-panel {
    border-right: 1px solid #e2e8f0;
}

.result-panel {
    background: #f8fafc;
}

.panel-heading {
    margin-bottom: 28px;
}

.panel-heading .section-label {
    display: inline-block;
    margin-bottom: 8px;
}

.panel-heading h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 27px;
    line-height: 1.25;
}

.panel-heading p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}


/* ===== FORM FIELDS ===== */

.field-group {
    margin-bottom: 22px;
}

.field-group label {
    display: block;
    margin-bottom: 8px;

    font-weight: 700;
    color: #0f172a;
}

.field-group small {
    display: block;
    margin-top: 7px;

    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.optional {
    font-weight: 500;
    color: #94a3b8;
}


/* ===== INPUTS ===== */

.field-group input,
.field-group select {
    width: 100%;
    min-height: 50px;

    padding: 12px 14px;

    border: 1px solid #cbd5e1;
    border-radius: 11px;

    background: #ffffff;
    color: #0f172a;

    font: inherit;
    font-size: 15px;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.field-group input:focus,
.field-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}


/* ===== PREFIX / SUFFIX INPUTS ===== */

.input-with-unit {
    display: flex;
    align-items: stretch;

    border: 1px solid #cbd5e1;
    border-radius: 11px;

    overflow: hidden;
    background: #ffffff;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.input-with-unit:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.input-with-unit input {
    border: 0;
    border-radius: 0;
    box-shadow: none !important;

    flex: 1;
    min-width: 0;
}

.currency-prefix,
.unit-suffix {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 62px;
    padding: 0 13px;

    background: #f1f5f9;
    color: #475569;

    font-size: 13px;
    font-weight: 800;
}

.currency-prefix {
    border-right: 1px solid #e2e8f0;
}

.unit-suffix {
    border-left: 1px solid #e2e8f0;
}


/* ===== ACTION BUTTONS ===== */

.calculator-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 28px;
}

.calculator-actions .primary-button,
.calculator-actions .secondary-button {
    border: 0;
    cursor: pointer;
}

.text-button {
    appearance: none;
    border: 0;
    background: transparent;

    padding: 12px 10px;

    color: #64748b;
    font: inherit;
    font-weight: 700;

    cursor: pointer;
}

.text-button:hover {
    color: #2563eb;
}


/* ===== ERROR ===== */

.calculator-error {
    display: none;

    margin-top: 18px;
    padding: 12px 14px;

    border: 1px solid #fecaca;
    border-radius: 10px;

    background: #fef2f2;
    color: #b91c1c;

    font-size: 14px;
    line-height: 1.5;
}

.calculator-error.show {
    display: block;
}


/* ===== PRIMARY RESULT ===== */

.result-primary {
    padding: 28px;

    border-radius: 18px;

    background: #0f172a;
    color: #ffffff;

    margin-bottom: 18px;
}

.result-primary .result-label {
    display: block;

    margin-bottom: 8px;

    color: #93c5fd;
    font-size: 13px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: .06em;
}

.result-primary strong {
    display: block;

    font-size: clamp(36px, 6vw, 54px);
    line-height: 1.08;

    margin-bottom: 9px;
}

.result-primary p {
    margin: 0;

    color: #cbd5e1;
    line-height: 1.55;
}


/* ===== RESULT CARDS ===== */

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.result-card {
    padding: 17px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 13px;
}

.result-card span {
    display: block;

    color: #64748b;
    font-size: 13px;
    font-weight: 600;

    margin-bottom: 6px;
}

.result-card strong {
    display: block;

    color: #0f172a;
    font-size: 20px;
    line-height: 1.25;
}

.result-card-wide {
    grid-column: span 2;
}


/* ===== FORMULA BOX ===== */

.formula-box {
    margin-top: 18px;

    padding: 18px;

    border: 1px solid #bfdbfe;
    border-radius: 13px;

    background: #eff6ff;
}

.formula-box strong {
    display: block;

    margin-bottom: 7px;

    color: #1d4ed8;
}

.formula-box p {
    margin: 0;

    color: #475569;
    line-height: 1.6;
}


/* ===== UTILITY ===== */

.hidden {
    display: none !important;
}


/* ===== NEGATIVE RESULT ===== */

.result-primary.loss {
    background: #7f1d1d;
}

.result-primary.loss .result-label {
    color: #fecaca;
}

.result-primary.loss p {
    color: #fee2e2;
}


/* ===== POSITIVE RESULT ===== */

.result-primary.positive {
    background: #0f172a;
}


/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {

    .calculator-grid {
        grid-template-columns: 1fr;
    }

    .input-panel {
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }

}


@media (max-width: 640px) {

    .calculator-shell {
        border-radius: 16px;
    }

    .calculator-tabs {
        grid-template-columns: 1fr;
    }

    .calc-tab {
        text-align: left;
    }

    .calc-tab.active {
        box-shadow: inset 4px 0 0 #2563eb;
    }

    .calculator-panel {
        padding: 22px 18px;
    }

    .panel-heading h2 {
        font-size: 23px;
    }

    .calculator-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .calculator-actions .primary-button,
    .calculator-actions .secondary-button,
    .calculator-actions .text-button {
        width: 100%;
        text-align: center;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .result-card-wide {
        grid-column: auto;
    }

    .result-primary {
        padding: 22px;
    }

}


@media (max-width: 420px) {

    .currency-prefix,
    .unit-suffix {
        min-width: 54px;
        padding-left: 10px;
        padding-right: 10px;
    }

}
.status.live {
    background: #dcfce7;
    color: #15803d;
}
/* ===== MARKUP PERCENTAGE EXAMPLES ===== */

.markup-example-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.markup-example-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px 22px;
}

.markup-example-card > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 34px;
    padding: 0 12px;
    margin-bottom: 16px;

    background: #eff6ff;
    border-radius: 999px;

    color: #2563eb;
    font-weight: 700;
}

.markup-example-card h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 19px;
}

.markup-example-card p {
    margin: 0 0 8px;
    color: #475569;
    line-height: 1.6;
}

.markup-example-card small {
    color: #64748b;
    line-height: 1.5;
}

.markup-example-note {
    margin-top: 20px;
    padding: 18px 22px;

    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-left: 4px solid #2563eb;
    border-radius: 14px;
}

.markup-example-note p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.markup-example-note strong {
    color: #0f172a;
}

@media (max-width: 900px) {
    .markup-example-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .markup-example-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== COMMON MARKUP MISTAKES ===== */

.markup-mistakes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.markup-mistakes-grid .benefit {
    height: 100%;
}

@media (max-width: 640px) {
    .markup-mistakes-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== RELATED RESOURCES ===== */

.related-resources-section .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.related-resources-section .category-card {
    padding: 22px 20px;
    min-height: 0;
    align-items: flex-start;
}

.related-resources-section .category-card h3 {
    margin-bottom: 6px;
    font-size: 19px;
}

.related-resources-section .category-card p {
    margin-bottom: 10px;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .related-resources-section .category-grid {
        grid-template-columns: 1fr;
    }
}