/**
 * Forte Calculator Styles
 * Адаптивный дизайн для десктопа и мобильных устройств
 */

/* Основные стили */
.forte-calculator-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.forte-calculator-container {
    display: flex;
    gap: 30px;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.forte-calculator-left {
    flex: 1;
    max-width: 600px;
}

.forte-calculator-right {
    flex: 0 0 420px;
}

/* Группы полей */
.forte-calc-group {
    margin-bottom: 32px;
}

.forte-calc-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

/* Слайдер суммы */
.forte-calc-range-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.forte-calc-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #00bcd4 0%, #00bcd4 var(--value, 15%), #e5e5e5 var(--value, 15%), #e5e5e5 100%);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 16px;
}

.forte-calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00bcd4;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
}

.forte-calc-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00bcd4;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
}

.forte-calc-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.forte-calc-input:focus {
    border-color: #00bcd4;
}

/* Убираем стрелки у input type=number */
.forte-calc-input::-webkit-outer-spin-button,
.forte-calc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Кнопки срока кредита */
.forte-calc-term-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.forte-calc-term-row1 {
    display: flex;
    gap: 12px;
}

.forte-calc-term-row2 {
    margin-top: 12px;
}

.forte-term-btn {
    flex: 1;
    min-width: 100px;
    padding: 14px 20px;
    font-size: 15px;
    color: #333;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 400;
}

.forte-term-btn:hover {
    border-color: #00bcd4;
    background: #f0f9fb;
}

.forte-term-btn.active {
    background: #00bcd4;
    border: 1px solid #00bcd4;
    color: #fff;
    font-weight: 500;
}

/* Кнопки зарплаты */
.forte-calc-salary-buttons {
    display: flex;
    gap: 12px;
}

.forte-salary-btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    color: #333;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 400;
}

.forte-salary-btn:hover {
    border-color: #00bcd4;
    background: #f0f9fb;
}

.forte-salary-btn.active {
    background: #00bcd4;
    border: 1px solid #00bcd4;
    color: #fff;
    font-weight: 500;
}

/* Правая панель - результаты */
.forte-calc-result-box {
    background: #fff;
    border-radius: 0;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.forte-calc-payment-section {
    margin-bottom: 40px;
    background: #f5f5f5;
    padding: 24px;
    border-radius: 8px;
}

.forte-calc-payment-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    text-align: center;
}

.forte-calc-payment-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.forte-calc-btn-minus,
.forte-calc-btn-plus {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
    background: #fff;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
}

.forte-calc-btn-minus:hover,
.forte-calc-btn-plus:hover {
    border-color: #00bcd4;
    background: #f0f9fb;
}

.forte-calc-payment-amount {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    min-width: 200px;
}

/* Сводка */
.forte-calc-summary {
    margin-bottom: 32px;
    padding-top: 0;
    border-top: none;
}

.forte-calc-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.forte-calc-summary-label {
    font-size: 15px;
    color: #666;
    font-weight: 400;
}

.forte-calc-summary-value {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Disclaimer текст */
.forte-calc-disclaimer {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.4;
    padding: 0 10px;
}

/* Кнопка отправки */
.forte-calc-submit-btn {
    display: block;
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #dc3545;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    margin-top: 8px;
}

.forte-calc-submit-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Адаптивный дизайн для планшетов */
@media (max-width: 1024px) {
    .forte-calculator-container {
        padding: 30px;
    }

    .forte-calculator-right {
        flex: 0 0 360px;
    }

    .forte-calc-payment-amount {
        font-size: 28px;
        min-width: 180px;
    }
}

/* Адаптивный дизайн для мобильных устройств */
@media (max-width: 768px) {
    .forte-calculator-wrapper {
        margin: 20px auto;
        padding: 0 15px;
    }

    .forte-calculator-container {
        flex-direction: column;
        padding: 24px;
        gap: 24px;
    }

    .forte-calculator-left {
        max-width: 100%;
    }

    .forte-calculator-right {
        flex: 1;
    }

    .forte-calc-group {
        margin-bottom: 24px;
    }

    .forte-calc-label {
        font-size: 16px;
    }

    .forte-calc-input {
        font-size: 18px;
        padding: 16px 20px;
        min-height: 56px;
    }

    .forte-calc-term-buttons {
        gap: 8px;
    }

    /* Первый ряд - 3 кнопки */
    .forte-calc-term-row1 .forte-term-btn {
        min-width: auto;
        padding: 12px 10px;
        font-size: 14px;
        flex: 1 1 calc(33.333% - 6px);
        min-height: 48px;
    }

    /* Второй ряд - 2 кнопки */
    .forte-calc-term-row2 {
        margin-top: 8px;
    }

    .forte-calc-term-row2 .forte-term-btn {
        min-width: auto;
        padding: 12px 14px;
        font-size: 14px;
        flex: 1 1 calc(50% - 4px);
        min-height: 48px;
    }

    .forte-salary-btn {
        padding: 12px 16px;
        font-size: 15px;
        min-height: 48px;
    }

    .forte-calc-result-box {
        padding: 24px 20px;
    }

    .forte-calc-payment-title {
        font-size: 16px;
    }

    .forte-calc-payment-amount {
        font-size: 24px;
        min-width: 140px;
    }

    .forte-calc-btn-minus,
    .forte-calc-btn-plus {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .forte-calc-payment-controls {
        gap: 12px;
    }

    .forte-calc-summary-label,
    .forte-calc-summary-value {
        font-size: 14px;
    }

    .forte-calc-disclaimer {
        font-size: 11px;
        margin-bottom: 12px;
    }

    .forte-calc-submit-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .forte-calculator-container {
        padding: 20px 16px;
    }

    .forte-calc-payment-amount {
        font-size: 22px;
        min-width: 120px;
    }

    .forte-calc-term-row1 .forte-term-btn {
        font-size: 13px;
        padding: 10px 8px;
    }

    .forte-calc-term-row2 .forte-term-btn {
        font-size: 13px;
        padding: 10px 10px;
    }

    .forte-calc-btn-minus,
    .forte-calc-btn-plus {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.forte-calculator-container {
    animation: fadeIn 0.4s ease-out;
}
