/* =============================================================
   INTEREST RATE CALCULATOR - CalcLeaf light theme
   All classes prefixed "irc-" to avoid collisions with other tools.
   ============================================================= */

.irc-tool {
    max-width: 820px;
    margin: 0 auto;
    font-family: inherit;
    color: #1e2a4a;
}

.irc-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.irc-hint {
    background: #1e2a4a;
    color: #ffffff;
    font-size: 13px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.irc-hint-icon {
    font-size: 11px;
}

.irc-form {
    padding: 18px 16px;
}

.irc-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.irc-row label {
    width: 140px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.irc-input {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #1e2a4a;
    background: #ffffff;
    width: 200px;
}

.irc-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.irc-input-prefix {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    width: 200px;
}

.irc-input-prefix .irc-input {
    border: none;
    width: 100%;
}

.irc-input-prefix .irc-input:focus {
    box-shadow: none;
}

.irc-prefix {
    padding: 0 10px;
    color: #6b7280;
    font-size: 14px;
    background: #f9fafb;
    border-right: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    align-self: stretch;
}

.irc-term-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.irc-input-small {
    width: 70px;
}

.irc-term-unit {
    font-size: 13px;
    color: #6b7280;
}

/* ---------- Buttons ---------- */
.irc-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.irc-btn {
    padding: 10px 28px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s;
}

.irc-btn:hover {
    opacity: 0.9;
}

.irc-btn-primary {
    background: #10b981;
    color: #ffffff;
}

.irc-btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #d1d5db;
}

/* ---------- Results ---------- */
.irc-results-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.irc-results-header {
    background: #1e2a4a;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
}

.irc-results-body {
    padding: 4px 16px 8px 16px;
}

.irc-result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
    color: #374151;
}

.irc-result-row:first-child {
    border-top: none;
}

.irc-result-row span:last-child {
    font-weight: 600;
    color: #1e2a4a;
}

.irc-result-highlight span:last-child {
    color: #10b981;
    font-size: 18px;
    font-weight: 700;
}

/* ---------- Charts ---------- */
.irc-charts-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.irc-chart-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 14px;
    flex: 1 1 380px;
}

.irc-donut-card {
    flex: 0 1 240px;
    text-align: center;
}

.irc-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e2a4a;
    margin-bottom: 10px;
    text-align: center;
}

#ircChart,
#ircDonut {
    max-width: 100%;
    height: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .irc-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .irc-row label {
        width: auto;
    }

    .irc-input,
    .irc-input-prefix {
        width: 100%;
    }

    .irc-actions {
        flex-direction: column;
    }

    .irc-btn {
        width: 100%;
    }

    .irc-charts-row {
        flex-direction: column;
    }
}
