/**
 * Mortgage Calculator Styles
 */

.gth-mortgage-calculator .gth-input-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.gth-mortgage-calculator .gth-prefix {
    position: absolute;
    left: 12px;
    color: var(--gth-text-secondary);
    pointer-events: none;
}

.gth-mortgage-calculator .gth-input-prefix .gth-input {
    padding-left: 28px;
}

.gth-mortgage-calculator .gth-suffix {
    position: absolute;
    right: 12px;
    color: var(--gth-text-secondary);
    pointer-events: none;
}

.gth-mortgage-calculator .gth-input-prefix .gth-input:has(+ .gth-suffix) {
    padding-right: 36px;
}

/* Payment Breakdown Bar */
.gth-mortgage-calculator .gth-payment-breakdown {
    margin: var(--gth-space-4) 0;
}

.gth-mortgage-calculator .gth-breakdown-bar {
    display: flex;
    height: 24px;
    border-radius: var(--gth-radius-full);
    overflow: hidden;
}

.gth-mortgage-calculator .gth-bar-segment {
    transition: width var(--gth-duration-slow) var(--gth-ease-default);
}

.gth-mortgage-calculator .gth-bar-segment[data-segment="principal"] { background: #2563eb; }
.gth-mortgage-calculator .gth-bar-segment[data-segment="interest"] { background: #7c3aed; }
.gth-mortgage-calculator .gth-bar-segment[data-segment="tax"] { background: #059669; }
.gth-mortgage-calculator .gth-bar-segment[data-segment="insurance"] { background: #d97706; }
.gth-mortgage-calculator .gth-bar-segment[data-segment="pmi"] { background: #dc2626; }
.gth-mortgage-calculator .gth-bar-segment[data-segment="hoa"] { background: #6b7280; }

.gth-mortgage-calculator .gth-breakdown-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gth-space-3);
    margin-top: var(--gth-space-3);
    font-size: var(--gth-text-sm);
}

.gth-mortgage-calculator .gth-legend-item {
    display: flex;
    align-items: center;
    gap: var(--gth-space-1);
}

.gth-mortgage-calculator .gth-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Summary Stats */
.gth-mortgage-calculator .gth-summary-stats {
    margin-top: var(--gth-space-4);
    padding: var(--gth-space-4);
    background: var(--gth-gray-50);
    border-radius: var(--gth-radius-md);
}

.gth-mortgage-calculator .gth-stat-row {
    display: flex;
    justify-content: space-between;
    padding: var(--gth-space-2) 0;
    font-size: var(--gth-text-sm);
    border-bottom: 1px solid var(--gth-border-color);
}

.gth-mortgage-calculator .gth-stat-row:last-child {
    border-bottom: none;
}

/* Amortization */
.gth-mortgage-calculator .gth-amortization {
    margin-top: var(--gth-space-4);
}

.gth-mortgage-calculator .gth-amortization-toggle {
    padding: var(--gth-space-3);
    font-weight: var(--gth-font-medium);
    cursor: pointer;
    background: var(--gth-gray-50);
    border-radius: var(--gth-radius-md);
}

.gth-mortgage-calculator .gth-amortization-table-wrap {
    max-height: 300px;
    overflow-y: auto;
    margin-top: var(--gth-space-3);
}

.gth-mortgage-calculator .gth-amortization-table {
    width: 100%;
    font-size: var(--gth-text-sm);
    border-collapse: collapse;
}

.gth-mortgage-calculator .gth-amortization-table th,
.gth-mortgage-calculator .gth-amortization-table td {
    padding: var(--gth-space-2);
    text-align: right;
    border-bottom: 1px solid var(--gth-border-color);
}

.gth-mortgage-calculator .gth-amortization-table th {
    background: var(--gth-gray-100);
    font-weight: var(--gth-font-medium);
    position: sticky;
    top: 0;
}

.gth-mortgage-calculator .gth-amortization-table td:first-child,
.gth-mortgage-calculator .gth-amortization-table th:first-child {
    text-align: left;
}
