/**
 * MFO Loan Calculator - Modern Design
 * Новий дизайн калькулятора для сторінок МФО
 */

.mfo-calculator-wrapper {
    width: 100%;
    padding: 30px 20px;
}

.mfo-calculator-container {
    max-width: 1140px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.mfo-calculator-header {
    background: #f8f9fa;
    padding: 15px 25px;
    text-align: center;
}

.mfo-calculator-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.mfo-calculator-content {
    padding: 25px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
}

/* Ліва панель - типи займів */
.mfo-calculator-left-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

/* Одинарна ставка (коли ставки однакові) */
.mfo-single-rate {
    text-align: center;
    padding: 15px 10px;
}

.mfo-single-rate-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.mfo-single-rate-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00955c;
}

.mfo-loan-type {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 8px;
}

.mfo-type-info {
    display: flex;
    flex-direction: column;
}

.mfo-type-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.mfo-type-rate {
    font-size: 0.85rem;
    color: #666;
}

/* Toggle Switch */
.mfo-switch {
    position: relative;
    width: 44px;
    height: 20px;
    background: #ccc;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mfo-switch.active {
    background: #00955c;
}

.mfo-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.mfo-switch.active .mfo-switch-thumb {
    transform: translateX(24px);
}

/* Права панель - контроли */
.mfo-calculator-right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mfo-control-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mfo-control-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    min-width: 170px;
}

.mfo-control-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mfo-amount-display,
.mfo-term-display {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 6px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    min-width: 80px;
}

.mfo-slider-container {
    flex: 1;
    position: relative;
}

.mfo-slider {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.mfo-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #00955c;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mfo-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #00955c;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Результати */
.mfo-results-section {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-top: 5px;
}

.mfo-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mfo-result-item {
    text-align: left;
}

.mfo-result-label {
    font-size: 0.9rem;
    color: #00955c;
    font-weight: 600;
    margin-bottom: 4px;
}

.mfo-result-value {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* Кнопки дій */
.mfo-actions-section {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    align-items: center;
}

.mfo-apply-button {
    background: #00955c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.mfo-apply-button:hover {
    background: #007a4d;
    color: white;
    text-decoration: none;
}

.mfo-info-button {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e9ecef;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mfo-check-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.mfo-small-text {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 0.8rem;
}

/* Мобільна адаптивність */
@media (max-width: 768px) {
    .mfo-calculator-wrapper {
        padding: 20px 15px;
    }

    .mfo-calculator-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .mfo-calculator-header {
        padding: 12px 20px;
    }

    .mfo-calculator-title {
        font-size: 1.2rem;
    }

    .mfo-calculator-left-panel {
        order: 1;
        padding: 15px;
    }

    .mfo-calculator-right-panel {
        order: 2;
    }

    .mfo-control-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .mfo-control-label {
        min-width: auto;
        text-align: left;
    }

    .mfo-control-input {
        gap: 10px;
    }

    .mfo-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .mfo-actions-section {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .mfo-apply-button {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .mfo-info-button {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .mfo-calculator-wrapper {
        padding: 15px 10px;
    }

    .mfo-calculator-content {
        padding: 15px;
    }

    .mfo-results-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .mfo-result-label {
        font-size: 0.75rem;
    }

    .mfo-result-value {
        font-size: 0.85rem;
    }

    .mfo-calculator-left-panel {
        padding: 10px 12px;
    }

    .mfo-loan-type {
        padding: 6px 0;
        margin-bottom: 3px;
    }
}
