/* Payment Calculator — style.css v1.0 */

.pcc-wrap {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

/* Header */
.pcc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.pcc-icon   { font-size: 32px; line-height: 1; }
.pcc-title  {
    font-size: 22px !important; font-weight: 600 !important;
    margin: 0 0 3px !important; padding: 0 !important;
    border: none !important; color: #1a1a1a !important;
}
.pcc-sub { font-size: 13px; color: #666; margin: 0; }

/* Tabs */
.pcc-tabs {
    display: flex;
    border: 1px solid #d0d0d0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}
.pcc-tab {
    flex: 1; padding: 11px 10px;
    font-size: 13px; font-weight: 500;
    border: none; border-right: 1px solid #d0d0d0;
    background: #fff; color: #555;
    cursor: pointer; transition: background .13s, color .13s;
    display: flex; flex-direction: column; align-items: center;
    gap: 3px; line-height: 1.3; text-align: center;
}
.pcc-tab:last-child { border-right: none; }
.pcc-tab:hover:not(.act) { background: #f5f0ff; }
.pcc-tab.act { background: #ede8fb; color: #4A1DB5; }
.pcc-tab-sub { font-size: 11px; font-weight: 400; opacity: .75; }

/* Panels */
.pcc-panel { display: none; }
.pcc-panel.act { display: block; }

/* Section labels */
.pcc-section-lbl {
    font-size: 11px; font-weight: 700; color: #999;
    text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: 10px; margin-top: 18px;
}

/* Grid */
.pcc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 4px;
}
@media (max-width: 480px) { .pcc-grid { grid-template-columns: 1fr; } }

/* Labels */
.pcc-lbl {
    display: flex; align-items: center; gap: 5px;
    font-size: 13px; font-weight: 500; color: #555;
    margin-bottom: 6px;
}
.pcc-tip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; border-radius: 50%;
    background: #ebebeb; font-size: 10px; color: #777;
    cursor: help; flex-shrink: 0; font-style: normal;
}

/* Inputs */
.pcc-iw { position: relative; }
.pcc-iw input[type="number"],
.pcc-iw select {
    width: 100%; box-sizing: border-box;
    padding: 9px 36px 9px 26px;
    border: 1px solid #d0d0d0; border-radius: 8px;
    font-size: 14px; color: #1a1a1a; background: #fff;
    outline: none; transition: border-color .15s;
    -moz-appearance: textfield;
}
.pcc-iw input::-webkit-inner-spin-button,
.pcc-iw input::-webkit-outer-spin-button { -webkit-appearance: none; }
.pcc-iw input:focus { border-color: #6C3EF4; box-shadow: 0 0 0 3px rgba(108,62,244,.1); }
.pcc-iw select {
    padding: 9px 12px; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; cursor: pointer;
}
.pcc-pre {
    position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
    font-size: 13px; color: #999; pointer-events: none;
}
.pcc-suf {
    position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: #999; pointer-events: none;
}

/* Term row */
.pcc-term-row { display: flex; gap: 14px; margin-bottom: 4px; }
.pcc-term-row > div { flex: 1; }
.pcc-sub-lbl { font-size: 11px; color: #aaa; margin-bottom: 5px; }

/* Warning box */
.pcc-warning {
    background: #FEF2F2; border: 1px solid #FECACA; border-radius: 10px;
    padding: 12px 16px; margin-top: 16px;
    font-size: 13px; color: #991B1B;
    display: flex; align-items: center; gap: 8px;
}

/* Result card */
.pcc-result-card {
    background: #f5f0ff; border: 1px solid #c4b5fd;
    border-radius: 12px; padding: 18px 20px;
    margin-top: 20px; margin-bottom: 16px;
    animation: pcc-in .22s ease;
}
@keyframes pcc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.pcc-res-top { display: flex; align-items: center; margin-bottom: 14px; }
.pcc-metric  { flex: 1; text-align: center; }
.pcc-sep     { width: 1px; height: 44px; background: #c4b5fd; }
.pcc-val     { font-size: 20px; font-weight: 700; color: #2E0D7A; }
.pcc-mlbl    { font-size: 11px; color: #6C3EF4; margin-top: 3px; }

/* Breakdown */
.pcc-breakdown { border-top: 1px solid #c4b5fd; padding-top: 12px; margin-bottom: 12px; }
.pcc-brow {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 0; font-size: 13px;
    border-bottom: 1px solid #ddd6fe;
}
.pcc-brow:last-child { border-bottom: none; font-weight: 600; }
.pcc-blbl { color: #4A2D9C; }
.pcc-bval { color: #2E0D7A; }

/* Bars */
.pcc-bars { border-top: 1px solid #c4b5fd; padding-top: 12px; }
.pcc-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.pcc-bar-row:last-child { margin-bottom: 0; }
.pcc-barlbl { font-size: 12px; color: #4A2D9C; width: 80px; flex-shrink: 0; }
.pcc-track  { flex: 1; height: 7px; background: #ddd6fe; border-radius: 4px; overflow: hidden; }
.pcc-fill   { height: 100%; border-radius: 4px; transition: width .5s ease; }
.pcc-baramt { font-size: 12px; color: #2E0D7A; width: 110px; text-align: right; flex-shrink: 0; }

/* Amortization */
.pcc-amort { margin-bottom: 14px; }
.pcc-amort-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pcc-amort-title { font-size: 15px; font-weight: 600; color: #1a1a1a; }
.pcc-abtns { display: flex; gap: 6px; }
.pcc-abtn {
    font-size: 12px; padding: 5px 12px;
    border: 1px solid #d0d0d0; border-radius: 6px;
    background: #fff; color: #555; cursor: pointer; transition: background .13s;
}
.pcc-abtn.act { background: #ede8fb; color: #4A1DB5; border-color: #c4b5fd; font-weight: 600; }

table.pcc-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
table.pcc-table th {
    padding: 8px 10px; text-align: right; color: #888;
    font-weight: 600; font-size: 11px; text-transform: uppercase;
    letter-spacing: .4px; border-bottom: 1px solid #e8e8e8; background: #fafafa;
}
table.pcc-table th:first-child { text-align: left; }
table.pcc-table td {
    padding: 7px 10px; text-align: right;
    color: #1a1a1a; border-bottom: 1px solid #f0f0f0;
}
table.pcc-table td:first-child { text-align: left; color: #555; font-weight: 500; }
table.pcc-table tr.pcc-yr-row td {
    background: #f9f6ff; font-size: 11px;
    font-weight: 600; color: #6C3EF4;
    text-transform: uppercase; letter-spacing: .3px;
}
table.pcc-table tr:hover:not(.pcc-yr-row) td { background: #f9f6ff; }
table.pcc-table tr:last-child td { border-bottom: none; }

.pcc-more-btn {
    width: 100%; margin-top: 8px; padding: 9px;
    font-size: 13px; color: #555; background: #fff;
    border: 1px solid #e0e0e0; border-radius: 8px;
    cursor: pointer; transition: background .13s;
}
.pcc-more-btn:hover { background: #f9f6ff; }

.pcc-reset-btn {
    display: block; width: 100%; margin-top: 10px; padding: 9px;
    font-size: 13px; color: #999; background: none;
    border: 1px solid #e8e8e8; border-radius: 8px;
    cursor: pointer; transition: background .13s;
}
.pcc-reset-btn:hover { background: #f5f5f5; color: #333; }
