/* MSME Interest Calculator - Tool Styles */
/* All classes prefixed with mi- to avoid collisions */

/* Calculator Section */
.mi-calculator-section {
    padding: 40px 0 80px;
}

.mi-calculator-section .container {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Reveal Animation */
.mi-reveal {
    animation: miReveal 0.4s ease-out;
}

@keyframes miReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Container */
.mi-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.mi-card h2 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 8px;
}

.mi-card h2 + p {
    color: var(--text-secondary, #6b6560);
    margin-bottom: 32px;
    font-size: 15px;
}

/* Form Layout */
.mi-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.mi-form-grid .mi-form-full {
    grid-column: 1 / -1;
}

.mi-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mi-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1a1715);
}

.mi-form-group label .mi-required {
    color: var(--primary, #f1643f);
}

.mi-form-group label .mi-label-hint {
    font-weight: 400;
    font-size: 12px;
    color: var(--text-secondary, #6b6560);
}

.mi-form-group select,
.mi-form-group input[type="text"],
.mi-form-group input[type="number"],
.mi-form-group input[type="date"] {
    padding: 10px 14px;
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Hanken Grotesk', sans-serif;
    color: var(--text-primary, #1a1715);
    background: var(--bg-card, #fff);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.mi-form-group select:focus,
.mi-form-group input:focus {
    border-color: var(--primary, #f1643f);
    box-shadow: 0 0 0 3px rgba(241, 100, 63, 0.1);
}

.mi-form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b6560' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.mi-field-error {
    font-size: 12px;
    color: #dc2626;
    margin-top: 2px;
    display: none;
}

.mi-field-error.visible {
    display: block;
}

/* Amount Input with Currency */
.mi-amount-input {
    display: flex;
    align-items: stretch;
}

.mi-currency-prefix {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color, #e2e0dc);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary, #6b6560);
    white-space: nowrap;
}

.mi-amount-input input {
    border-radius: 0 8px 8px 0 !important;
}

/* Payment Terms Toggle */
.mi-toggle-group {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 8px;
    overflow: hidden;
}

.mi-toggle-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', sans-serif;
    border: none;
    background: var(--bg-card, #fff);
    color: var(--text-secondary, #6b6560);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.mi-toggle-btn:not(:last-child) {
    border-right: 1px solid var(--border-color, #e2e0dc);
}

.mi-toggle-btn.active {
    background: var(--primary, #f1643f);
    color: #fff;
}

.mi-toggle-btn:hover:not(.active) {
    background: rgba(241, 100, 63, 0.05);
    color: var(--primary, #f1643f);
}

.mi-custom-days {
    margin-top: 12px;
    display: none;
}

.mi-custom-days.visible {
    display: block;
}

/* Buttons */
.mi-btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    gap: 16px;
}

.mi-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: var(--primary, #f1643f);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mi-btn-primary:hover {
    background: #d4532f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(241, 100, 63, 0.3);
}

.mi-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mi-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    color: var(--text-primary, #1a1715);
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mi-btn-secondary:hover {
    border-color: var(--text-secondary, #6b6560);
    background: rgba(0, 0, 0, 0.02);
}

/* ===== RESULTS ===== */

.mi-results-card {
    margin-top: 24px;
}

/* Results Summary Banner */
.mi-results-banner {
    text-align: center;
    padding: 32px 24px;
    border-radius: 14px;
    background: var(--primary, #f1643f);
    color: #fff;
    margin-bottom: 24px;
}

.mi-results-banner .mi-results-amount {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.mi-results-banner .mi-results-label {
    font-size: 15px;
    font-weight: 500;
    opacity: 0.9;
}

/* Summary Grid */
.mi-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.mi-summary-item {
    text-align: center;
    padding: 20px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e0dc);
    background: var(--bg-card, #fff);
}

.mi-summary-item .mi-summary-value {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--text-primary, #1a1715);
}

.mi-summary-item .mi-summary-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #6b6560);
}

/* Breakdown Table */
.mi-breakdown {
    margin-bottom: 24px;
}

.mi-breakdown h3 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 16px;
}

.mi-breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

.mi-breakdown-table tr {
    border-bottom: 1px solid var(--border-color, #e2e0dc);
}

.mi-breakdown-table tr:last-child {
    border-bottom: none;
}

.mi-breakdown-table td {
    padding: 12px 0;
    font-size: 14px;
}

.mi-breakdown-table td:first-child {
    color: var(--text-secondary, #6b6560);
    font-weight: 500;
}

.mi-breakdown-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--text-primary, #1a1715);
}

.mi-breakdown-table tr.mi-total-row td {
    padding-top: 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary, #f1643f);
    border-top: 2px solid var(--border-color, #e2e0dc);
}

/* Warning Callout */
.mi-callout {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-primary, #1a1715);
    line-height: 1.5;
    margin-bottom: 16px;
}

.mi-callout.warning {
    background: rgba(249, 115, 22, 0.06);
    border: 1px solid rgba(249, 115, 22, 0.15);
}

.mi-callout.danger {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.mi-callout.info {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.mi-callout-icon {
    flex-shrink: 0;
}

.mi-callout.warning .mi-callout-icon {
    color: #f97316;
}

.mi-callout.danger .mi-callout-icon {
    color: #ef4444;
}

.mi-callout.info .mi-callout-icon {
    color: #3b82f6;
}

.mi-callout strong {
    font-weight: 700;
}

/* ===== SEO CONTENT ===== */
.mi-seo-content {
    padding: 80px 0;
    background: rgba(0, 0, 0, 0.02);
}

.mi-seo-content h2 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 12px;
    text-align: center;
}

.mi-seo-content > .container > p {
    text-align: center;
    color: var(--text-secondary, #6b6560);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
    font-size: 15px;
}

.mi-seo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.mi-seo-card {
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e0dc);
    background: var(--bg-card, #fff);
}

.mi-seo-card h3 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary, #1a1715);
}

.mi-seo-card p {
    font-size: 14px;
    color: var(--text-secondary, #6b6560);
    line-height: 1.6;
    margin: 0;
}

/* ===== FAQ SECTION ===== */
.mi-faq-section {
    padding: 80px 0;
}

.mi-faq-section h2 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 32px;
    text-align: center;
}

.mi-faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mi-faq-item {
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card, #fff);
}

.mi-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 18px 20px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1a1715);
    transition: background 0.2s ease;
}

.mi-faq-question:hover {
    background: rgba(0, 0, 0, 0.02);
}

.mi-faq-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--text-secondary, #6b6560);
    transition: transform 0.2s ease;
}

.mi-faq-item.open .mi-faq-chevron {
    transform: rotate(180deg);
}

.mi-faq-answer {
    display: none;
    padding: 0 20px 18px;
}

.mi-faq-item.open .mi-faq-answer {
    display: block;
}

.mi-faq-answer p {
    font-size: 14px;
    color: var(--text-secondary, #6b6560);
    line-height: 1.7;
    margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 809px) {
    .mi-card {
        padding: 24px 20px;
    }

    .mi-form-grid {
        grid-template-columns: 1fr;
    }

    .mi-summary-grid {
        grid-template-columns: 1fr;
    }

    .mi-btn-row {
        flex-direction: column-reverse;
    }

    .mi-btn-primary,
    .mi-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .mi-seo-grid {
        grid-template-columns: 1fr;
    }

    .mi-results-banner .mi-results-amount {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .mi-calculator-section {
        padding: 0 0 48px;
    }

    .mi-card {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .mi-card h2 {
        font-size: 20px;
    }

    .mi-results-banner {
        padding: 24px 16px;
    }

    .mi-results-banner .mi-results-amount {
        font-size: 28px;
    }

    .mi-summary-item .mi-summary-value {
        font-size: 22px;
    }

    .mi-seo-content {
        padding: 48px 0;
    }

    .mi-seo-content h2 {
        font-size: 22px;
    }

    .mi-faq-section {
        padding: 48px 0;
    }

    .mi-faq-section h2 {
        font-size: 22px;
    }

    .mi-faq-question {
        font-size: 14px;
        padding: 14px 16px;
    }

    .mi-faq-answer {
        padding: 0 16px 14px;
    }

    .mi-toggle-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
}
