/* ============================================================
   Percentage Calculator — percentage-calculator.css
   calcdaystime.com — Smart Tools Suite
   ============================================================ */

#sts-pc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 680px;
    background: #ffffff;
    border: 1px solid #dce4ef;
    border-radius: 14px;
    overflow: hidden;
    color: #1A3A5C;
}

/* ── Tabs ── */
.sts-pc__tabs {
    display: flex;
    flex-wrap: wrap;
    background: #e2eaf3;
    border-bottom: 1px solid #c8d8e8;
}

.sts-pc__tab {
    flex: 1;
    padding: 13px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #1A3A5C;
    border: none;
    background: #e2eaf3;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    font-family: inherit;
    border-right: 1px solid #c8d8e8;
    text-align: center;
    transition: all .15s;
}
.sts-pc__tab:last-child { border-right: none; }
.sts-pc__tab:hover { background: #d0dcea; color: #1D9E75; }
.sts-pc__tab.sts-pc--active {
    color: #1D9E75;
    border-bottom-color: #1D9E75;
    background: #ffffff;
}

/* ── Panel ── */
.sts-pc__panel { padding: 24px; display: none; background: #ffffff; }
.sts-pc__panel.sts-pc--active { display: block; }

/* ── Input row ── */
.sts-pc__eq-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}
.sts-pc__field { display: flex; flex-direction: column; gap: 5px; }
.sts-pc__lbl {
    font-size: 11px;
    font-weight: 700;
    color: #7a9ab5;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.sts-pc__inp-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #c4d0de;
    border-radius: 8px;
    background: #f7f9fc;
    overflow: hidden;
    transition: border-color .15s;
}
.sts-pc__inp-wrap:focus-within { border-color: #1D9E75; background: #ffffff; }
.sts-pc__sym { padding: 0 8px; font-size: 14px; color: #1D9E75; font-weight: 700; flex-shrink: 0; }
.sts-pc__inp {
    width: 100%;
    padding: 11px 8px;
    border: none;
    background: transparent;
    color: #1A3A5C;
    font-size: 16px;
    font-family: inherit;
    font-weight: 600;
    min-width: 0;
}
.sts-pc__inp:focus { outline: none; }
.sts-pc__inp::placeholder { color: #b0bec5; font-weight: 400; }
.sts-pc__inp[type=number]::-webkit-inner-spin-button,
.sts-pc__inp[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.sts-pc__inp[type=number] { -moz-appearance: textfield; }

.sts-pc__op {
    font-weight: 700;
    color: #b0bec5;
    text-align: center;
    padding-top: 20px;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1.4;
}

/* result box */
.sts-pc__result-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid rgba(29,158,117,.4);
    border-radius: 8px;
    background: #f0f9f5;
    overflow: hidden;
    min-height: 46px;
}
.sts-pc__result {
    width: 100%;
    padding: 11px 12px;
    color: #1D9E75;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Sentence output ── */
.sts-pc__sentence {
    font-size: 14px;
    color: #5a6a7a;
    background: #f7f9fc;
    border-radius: 8px;
    padding: 13px 16px;
    border: 1px solid #dce4ef;
    line-height: 1.7;
    margin-bottom: 16px;
    display: none;
}

/* ── Two col inputs ── */
.sts-pc__two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

/* ── Result cards ── */
.sts-pc__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.sts-pc__card { background: #f7f9fc; border: 1.5px solid #dce4ef; border-radius: 8px; padding: 12px 14px; text-align: center; }
.sts-pc__card.sts-pc--hi { background: #f0f9f5; border-color: rgba(29,158,117,.3); }
.sts-pc__card-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #7a9ab5; margin-bottom: 4px; }
.sts-pc__card-val { font-size: 20px; font-weight: 800; color: #1A3A5C; }
.sts-pc__card.sts-pc--hi .sts-pc__card-val { color: #1D9E75; }

/* ── Quick examples ── */
.sts-pc__examples { border-top: 1px solid #dce4ef; padding-top: 14px; }
.sts-pc__ex-lbl { font-size: 11px; font-weight: 700; color: #7a9ab5; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px; }
.sts-pc__ex-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sts-pc__ex-btn {
    padding: 6px 14px;
    border: 1.5px solid #dce4ef;
    border-radius: 20px;
    background: #f7f9fc;
    font-size: 12px;
    font-weight: 600;
    color: #1A3A5C;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.sts-pc__ex-btn:hover { border-color: #1D9E75; color: #1D9E75; background: #f0f9f5; }

/* ══ MOBILE ══════════════════════════════════════════════ */
@media (max-width: 560px) {

    /* Tabs — 3 per row, wrap to 2 rows, no scroll */
    .sts-pc__tab {
        flex: 0 0 33.33% !important;
        font-size: 11px !important;
        padding: 9px 2px !important;
        white-space: normal !important;
        line-height: 1.3 !important;
        box-sizing: border-box !important;
    }

    /* Panel padding */
    .sts-pc__panel { padding: 14px !important; }

    /* Eq row — input | op | input on top, result full width below */
    .sts-pc__eq-row {
        grid-template-columns: 1fr auto 1fr !important;
        gap: 6px !important;
    }
    .sts-pc__eq-row .sts-pc__field:last-child {
        grid-column: 1 / -1 !important;
    }
    .sts-pc__op { padding-top: 16px !important; font-size: 12px !important; }

    /* Inputs — reduce padding so content is visible */
    .sts-pc__inp { padding: 10px 4px !important; font-size: 16px !important; }
    .sts-pc__sym { padding: 0 5px !important; font-size: 12px !important; }

    /* Two col → 1 col */
    .sts-pc__two-col { grid-template-columns: 1fr !important; gap: 10px !important; }

    /* Cards → 1 col */
    .sts-pc__cards { grid-template-columns: 1fr !important; gap: 8px !important; }
    .sts-pc__card-val { font-size: 18px !important; }
}
