/* calculator-style.css - стили для страницы калькулятора стоимости установки */

/* ===== ОСНОВНЫЕ НАСТРОЙКИ ===== */
.calculator-page {
    background-color: #fafafa;
}

/* ===== КАЛЬКУЛЯТОР - МОБИЛЬНАЯ ВЕРСИЯ ===== */
.calculator-section {
    padding: 1rem !important;
    margin: 1rem auto !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03), 0 5px 15px rgba(0,191,165,0.1);
    border: 1px solid rgba(0,191,165,0.1);
    width: 95%;
    max-width: 1200px;
}

@media (min-width: 768px) {
    .calculator-section {
        padding: 2rem !important;
        margin: 2rem auto !important;
        border-radius: 30px !important;
    }
}

/* Заголовок калькулятора */
.calculator-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.calculator-header h2 {
    font-size: 1.6rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .calculator-header h2 {
        font-size: 2.2rem;
    }
}

.calculator-header h2 span {
    color: #00BFA5;
    font-weight: 400;
}

.calculator-header p {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .calculator-header p {
        font-size: 1.1rem;
    }
}

/* Сетка калькулятора */
.calculator-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .calculator-grid {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        gap: 2rem;
        align-items: start;
    }
}

/* Форма калькулятора */
.calculator-form {
    background: white;
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,191,165,0.1);
}

@media (min-width: 768px) {
    .calculator-form {
        border-radius: 24px;
        padding: 1.8rem;
    }
}

/* Группы полей */
.calculator-form .form-group {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1.2rem;
}

.calculator-form .form-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.calculator-form label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .calculator-form label {
        font-size: 1.1rem;
    }
}

/* Стили для select */
.calculator-form select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #2c3e50;
    background: white;
    transition: all 0.3s;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300BFA5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1rem;
}

@media (min-width: 768px) {
    .calculator-form select {
        padding: 1rem 1.2rem;
        font-size: 1rem;
        border-radius: 16px;
        background-position: right 1rem center;
    }
}

.calculator-form select:hover {
    border-color: #00BFA5;
}

.calculator-form select:focus {
    outline: none;
    border-color: #00BFA5;
    box-shadow: 0 0 0 3px rgba(0,191,165,0.1);
}

/* Блок со скидкой */
.discount-checkbox {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: #f0f9f7;
    border-radius: 12px;
    border: 2px solid #00BFA5;
    margin-top: 1rem;
    flex-wrap: wrap;
}

@media (min-width: 480px) {
    .discount-checkbox {
        flex-wrap: nowrap;
        padding: 1rem 1.5rem;
    }
}

.discount-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #00BFA5;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.discount-checkbox label {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
    margin: 0;
    cursor: pointer;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .discount-checkbox label {
        font-size: 1rem;
    }
}

.discount-checkbox .discount-badge {
    background: #FF5722;
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.3);
    display: inline-block;
}

.info-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.5rem;
    font-style: italic;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .info-text {
        font-size: 0.9rem;
    }
}

/* Ползунки (range) */
.range-input {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

@media (min-width: 480px) {
    .range-input {
        flex-wrap: nowrap;
    }
}

.range-input input[type="range"] {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
    min-width: 150px;
}

.range-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #00BFA5;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,191,165,0.3);
    margin-top: -6px;
}

.range-input input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #00BFA5;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,191,165,0.3);
}

.range-input input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
}

.range-input span {
    min-width: 60px;
    text-align: right;
    font-weight: 600;
    color: #00BFA5;
    background: #f0f9f7;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-size: 0.85rem;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .range-input span {
        min-width: 70px;
        font-size: 0.95rem;
    }
}

/* Чекбоксы дополнительных услуг */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.3rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 0.8rem;
}

@media (min-width: 768px) {
    .checkbox-group {
        max-height: 350px;
        gap: 0.8rem;
    }
}

.checkbox-group::-webkit-scrollbar {
    width: 6px;
}

.checkbox-group::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}

.checkbox-group::-webkit-scrollbar-thumb {
    background: #00BFA5;
    border-radius: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed #e9ecef;
}

.checkbox-item:last-child {
    border-bottom: none;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #00BFA5;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-item label {
    flex: 1;
    font-weight: 400;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .checkbox-item label {
        font-size: 0.95rem;
    }
}

.checkbox-item .service-price {
    color: #00BFA5;
    font-weight: 600;
    margin-left: 0.5rem;
    white-space: nowrap;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .checkbox-item .service-price {
        font-size: 0.9rem;
    }
}

/* Панель результата */
.calculator-result {
    background: linear-gradient(135deg, #001f3f, #006064);
    border-radius: 20px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 20px 40px rgba(0,31,63,0.2);
    margin-top: 0;
}

@media (min-width: 768px) {
    .calculator-result {
        border-radius: 24px;
        padding: 2rem;
        position: sticky;
        top: 20px;
    }
}

.result-title {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

@media (min-width: 768px) {
    .result-title {
        font-size: 1.8rem;
    }
}

.result-services {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
}

@media (min-width: 768px) {
    .result-services {
        max-height: 350px;
    }
}

.result-services::-webkit-scrollbar {
    width: 6px;
}

.result-services::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.result-services::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

.result-service-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    opacity: 0.9;
    padding: 0.3rem 0;
    border-bottom: 1px dotted rgba(255,255,255,0.1);
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .result-service-item {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }
}

.result-service-item:last-child {
    border-bottom: none;
}

.result-service-item .service-name {
    flex: 1;
    padding-right: 0.5rem;
    word-break: break-word;
}

.result-service-item .service-cost {
    font-weight: 600;
    white-space: nowrap;
}

.discount-line {
    color: #FFD700 !important;
    font-weight: 600;
}

.result-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.2rem 0 1.5rem;
    padding-top: 0.8rem;
    border-top: 2px solid rgba(255,255,255,0.3);
    font-size: 1.4rem;
    font-weight: 600;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .result-total {
        font-size: 1.8rem;
        margin: 1.5rem 0 2rem;
    }
}

.result-total span:last-child {
    color: #FFD700;
    white-space: nowrap;
}

.result-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: white;
    color: #001f3f;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
}

@media (min-width: 768px) {
    .result-btn {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
}

.result-btn:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.result-btn:active {
    transform: translateY(0);
}

.result-note {
    margin-top: 1rem;
    font-size: 0.75rem;
    text-align: center;
    opacity: 0.7;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .result-note {
        font-size: 0.85rem;
    }
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 380px) {
    .discount-checkbox {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .discount-checkbox .discount-badge {
        align-self: flex-start;
    }
    
    .checkbox-item label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    
    .checkbox-item .service-price {
        margin-left: 0;
    }
    
    .range-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .range-input span {
        text-align: center;
    }
    
    .result-total {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}