/* Loan EMI Calculator - tool-specific styles (imports tools-common.css) */

.emi-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.input-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.input-group-header label {
    margin-bottom: 0;
}

.unit-toggle {
    display: flex;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.unit-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}

.unit-btn.active {
    background: var(--primary-color);
    color: white;
}

.unit-fields {
    display: flex;
    align-items: center;
    gap: 10px;
}

.unit-fields input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    min-width: 0;
}

.unit-fields input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.unit-suffix {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.emi-result {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.emi-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.emi-stat {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 20px;
    text-align: center;
}

.emi-stat.highlight {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: transparent;
}

.emi-stat.highlight .emi-stat-label,
.emi-stat.highlight .emi-stat-value {
    color: white;
}

.emi-stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.emi-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1f2937;
}

.breakdown-wrap {
    margin-bottom: 25px;
}

.breakdown-bar {
    display: flex;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--border-color);
    margin-bottom: 12px;
}

.breakdown-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.principal-segment {
    background: var(--primary-color);
}

.interest-segment {
    background: var(--warning-color);
}

.breakdown-legend {
    display: flex;
    gap: 24px;
    font-size: 0.88rem;
    color: #374151;
    flex-wrap: wrap;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.principal-dot {
    background: var(--primary-color);
}

.interest-dot {
    background: var(--warning-color);
}

.disclaimer-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 16px 18px;
}

.disclaimer-box i {
    color: var(--warning-color);
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 2px;
}

.disclaimer-box p {
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.6;
}

@media (max-width: 480px) {
    .emi-stat-value { font-size: 1.3rem; }
}
