/* CalWhat Calculator Platform - CarLoanCalculator Specific Styles */
/* Mobile-first: base = mobile, scale up with min-width. 全域 class (.glass-card/.form-input/.btn-*) 不重定義 */

/* ========== Input Styles ========== */
.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-label i {
    margin-right: 8px;
    color: #667eea;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .form-input {
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.input-wrapper select.form-input {
    appearance: auto;
    -webkit-appearance: menulist;
    cursor: pointer;
}

.input-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-weight: 500;
    pointer-events: none;
    font-size: 0.9rem;
}

/* ========== Tooltip ========== */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    margin-left: 8px;
    cursor: help;
    position: relative;
    flex-shrink: 0;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2d3748;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: normal;
    min-width: 180px;
    max-width: 260px;
    z-index: 1000;
    transition: opacity 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2d3748;
}

.tooltip-icon:hover .tooltip-text,
.tooltip-icon:focus .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ========== Result Display ========== */
.result-card {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.result-title {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-title i {
    margin-right: 8px;
    color: #667eea;
}

.result-value {
    font-size: 2rem;
    font-weight: 800;
    color: #667eea;
    line-height: 1.2;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item-label {
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.result-item-label i {
    margin-right: 8px;
    color: #667eea;
    font-size: 0.85rem;
}

.result-item-value {
    font-weight: 700;
    color: #2d3748;
    font-size: 0.95rem;
}

.result-item-value.positive {
    color: #22c55e;
}

.result-item-value.negative {
    color: #ef4444;
}

/* ========== Rate Badges (頭期款佔比 / 貸款年限) ========== */
.rate-badge-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.rate-badge {
    flex: 1;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
}

.rate-badge-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 4px;
}

.rate-badge-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #667eea;
}

/* ========== Chart ========== */
.chart-container {
    position: relative;
    height: 280px;
    margin-top: 8px;
}

/* ========== Method Note ========== */
.year-note {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 12px;
    text-align: center;
}

.year-note a {
    color: #667eea;
}

/* ========== Responsive ========== */
@media (min-width: 992px) {
    .result-value {
        font-size: 2.4rem;
    }
}
