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

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

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

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

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

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

/* Contribute toggle */
.icc-contrib-toggle {
    display: flex; border: 1px solid #d0d0d0; border-radius: 8px; overflow: hidden;
}
.icc-ctbtn {
    flex: 1; padding: 9px 6px; font-size: 12.5px; border: none;
    border-right: 1px solid #d0d0d0; background: #fff; color: #555;
    cursor: pointer; transition: background .13s, color .13s; text-align: center;
}
.icc-ctbtn:last-child { border-right: none; }
.icc-ctbtn:hover:not(.act) { background: #f0faf3; }
.icc-ctbtn.act { background: #e6f4ea; color: #1B7A3E; font-weight: 600; }

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

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

.icc-res-top { display: flex; align-items: center; margin-bottom: 14px; }
.icc-metric  { flex: 1; text-align: center; }
.icc-sep     { width: 1px; height: 44px; background: #9fdcb5; }
.icc-val     { font-size: 20px; font-weight: 700; color: #063B17; }
.icc-mlbl    { font-size: 11px; color: #1B7A3E; margin-top: 3px; }

/* Breakdown */
.icc-breakdown { border-top: 1px solid #9fdcb5; padding-top: 12px; margin-bottom: 12px; }
.icc-brow {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 0; font-size: 13px;
    border-bottom: 1px solid #c8edd5;
}
.icc-brow:last-child { border-bottom: none; font-weight: 600; font-size: 14px; }
.icc-brow-first { font-weight: 700 !important; }
.icc-blbl { color: #1B5E3B; }
.icc-bval { color: #063B17; }

/* Bars */
.icc-bars { border-top: 1px solid #9fdcb5; padding-top: 12px; }
.icc-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.icc-bar-row:last-child { margin-bottom: 0; }
.icc-barlbl  { font-size: 12px; color: #1B5E3B; width: 120px; flex-shrink: 0; }
.icc-track   { flex: 1; height: 7px; background: #c8edd5; border-radius: 4px; overflow: hidden; }
.icc-fill    { height: 100%; border-radius: 4px; transition: width .5s ease; }
.icc-baramt  { font-size: 12px; color: #063B17; width: 110px; text-align: right; flex-shrink: 0; }

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

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

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

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