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

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

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

/* Section labels */
.amc-section-lbl {
    font-size: 11px; font-weight: 700; color: #999;
    text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: 10px; margin-top: 18px;
    display: flex; align-items: center; gap: 8px;
}
.amc-seclbl-note {
    font-size: 11px; font-weight: 400;
    color: #bbb; text-transform: none; letter-spacing: 0;
}

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

/* Labels */
.amc-lbl {
    display: flex; align-items: center; gap: 5px;
    font-size: 13px; font-weight: 500; color: #555;
    margin-bottom: 6px;
}
.amc-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 */
.amc-iw { position: relative; }
.amc-iw input[type="number"] {
    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;
}
.amc-iw input::-webkit-inner-spin-button,
.amc-iw input::-webkit-outer-spin-button { -webkit-appearance: none; }
.amc-iw input:focus { border-color: #1565C0; box-shadow: 0 0 0 3px rgba(21,101,192,.1); }
.amc-pre {
    position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
    font-size: 13px; color: #999; pointer-events: none;
}
.amc-suf {
    position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: #999; pointer-events: none;
}

/* Term buttons */
.amc-term-btns {
    display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 4px;
}
.amc-tbtn {
    padding: 7px 14px; font-size: 13px;
    border: 1px solid #d0d0d0; border-radius: 7px;
    background: #fff; color: #555; cursor: pointer;
    transition: background .13s, color .13s;
}
.amc-tbtn:hover:not(.act) { background: #e8f4fd; }
.amc-tbtn.act { background: #e8f4fd; color: #1565C0; border-color: #64B5F6; font-weight: 600; }
.amc-custom-term-wrap { width: 90px; }
.amc-custom-term-wrap input { padding: 7px 28px 7px 10px !important; }

/* Comparison cards */
.amc-comparison-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 12px;
}
@media (max-width: 480px) { .amc-comparison-cards { grid-template-columns: 1fr; } }

.amc-card {
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid;
    animation: amc-in .22s ease;
}
@keyframes amc-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.amc-card-base  { background: #f0f6ff; border-color: #90CAF9; }
.amc-card-extra { background: #f0faf3; border-color: #81C784; }

.amc-card-title {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .4px;
    margin-bottom: 10px;
}
.amc-card-base  .amc-card-title { color: #1565C0; }
.amc-card-extra .amc-card-title { color: #2E7D32; }

.amc-card-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 0; font-size: 12px;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.amc-card-row:last-child, .amc-card-total { border-bottom: none; }
.amc-card-total { font-weight: 600; font-size: 13px; padding-top: 7px; margin-top: 3px; }
.amc-card-lbl { color: #555; }
.amc-card-val { color: #1a1a1a; font-weight: 500; }

/* Savings banner */
.amc-savings-banner {
    background: linear-gradient(135deg, #1B7A3E 0%, #1565C0 100%);
    color: #fff;
    border-radius: 10px;
    padding: 12px 18px;
    text-align: center;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.5;
}
.amc-savings-banner strong {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

/* Bars */
.amc-bars {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.amc-bars-title {
    font-size: 12px; font-weight: 600; color: #888;
    margin-bottom: 10px; text-transform: uppercase; letter-spacing: .3px;
}
.amc-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.amc-bar-row:last-child { margin-bottom: 0; }
.amc-barlbl  { font-size: 12px; color: #555; width: 110px; flex-shrink: 0; }
.amc-track   { flex: 1; height: 7px; background: #e0e0e0; border-radius: 4px; overflow: hidden; }
.amc-fill    { height: 100%; border-radius: 4px; transition: width .5s ease; }
.amc-baramt  { font-size: 12px; color: #1a1a1a; width: 110px; text-align: right; flex-shrink: 0; }

/* Table section */
.amc-table-section { margin-bottom: 14px; }
.amc-table-head {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 10px;
}
.amc-table-title { font-size: 15px; font-weight: 600; color: #1a1a1a; }
.amc-view-btns  { display: flex; gap: 6px; }
.amc-vbtn {
    font-size: 12px; padding: 5px 12px;
    border: 1px solid #d0d0d0; border-radius: 6px;
    background: #fff; color: #555; cursor: pointer; transition: background .13s;
}
.amc-vbtn.act { background: #e8f4fd; color: #1565C0; border-color: #90CAF9; font-weight: 600; }

table.amc-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
table.amc-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.amc-table th:first-child { text-align: left; }
table.amc-table td {
    padding: 7px 10px; text-align: right;
    color: #1a1a1a; border-bottom: 1px solid #f0f0f0;
}
table.amc-table td:first-child { text-align: left; color: #555; font-weight: 500; }
table.amc-table tr.amc-yr-row td {
    background: #f0f6ff; font-size: 11px;
    font-weight: 600; color: #1565C0;
    text-transform: uppercase; letter-spacing: .3px;
}
table.amc-table tr:hover:not(.amc-yr-row) td { background: #f0f6ff; }
table.amc-table tr:last-child td { border-bottom: none; }

.amc-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;
}
.amc-more-btn:hover { background: #f0f6ff; }

.amc-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;
}
.amc-reset-btn:hover { background: #f5f5f5; color: #333; }
