/**
 * Стили для калькулятора металлоконструкций
 * Версия: 1.0 (как у предыдущих калькуляторов)
 * Цветовая схема: #3A566D
 */

/* ========== БАЗОВЫЕ СТИЛИ ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #333;
    background: #fff;
    width: 100%;
    min-width: 320px;
    overflow-x: hidden;
}

/* ========== ОСНОВНОЙ КОНТЕЙНЕР ========== */
.metal-structures-calculator {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.metal-structures-calculator h2 {
    color: #3A566D;
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

/* ========== ФОРМЫ ========== */
.metal-structures-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #3A566D;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-icon {
    font-size: 16px;
}

.form-hint {
    color: #666;
    display: block;
    margin-top: 5px;
    font-size: 13px;
}

.form-hint.warning {
    color: #f59e0b;
}

/* ========== ПОЛЯ ВВОДА ========== */
.metal-structures-form select,
.metal-structures-form input[type="number"],
.metal-structures-form input[type="text"],
.metal-structures-form input[type="tel"],
.metal-structures-form input[type="email"],
.metal-structures-form textarea,
.metal-structures-form input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #3A566D;
    border-radius: 6px;
    font-size: 16px;
    background: #FFFFFF;
    color: #333;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: all 0.3s ease;
}

.metal-structures-form select:focus,
.metal-structures-form input:focus,
.metal-structures-form textarea:focus {
    outline: none;
    border-color: #2d4455;
    box-shadow: 0 0 0 3px rgba(58, 86, 109, 0.1);
}

/* ========== СЕТКА РАЗМЕРОВ ========== */
.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* ========== РАДИО-КНОПКИ (КАРТОЧКИ) ========== */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 2px solid #3A566D;
    border-radius: 8px;
    cursor: pointer;
    background: #FFFFFF;
    transition: all 0.3s ease;
}

.radio-label:hover {
    background: #f0f4f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(58, 86, 109, 0.15);
}

.radio-label input[type="radio"] {
    margin: 3px 12px 0 0;
    accent-color: #3A566D;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.radio-text strong {
    color: #3A566D;
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.radio-text small {
    color: #666;
    font-size: 13px;
    display: block;
    line-height: 1.3;
}

/* ========== ЧЕКБОКСЫ ========== */
.checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid #3A566D;
    border-radius: 6px;
    cursor: pointer;
    background: #FFFFFF;
    margin-bottom: 10px;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    accent-color: #3A566D;
    width: 18px;
    height: 18px;
}

/* ========== КНОПКИ ========== */
.calculate-btn,
.order-btn,
.submit-btn {
    width: 100%;
    padding: 15px 20px;
    background: #3A566D;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calculate-btn:hover,
.order-btn:hover,
.submit-btn:hover {
    background: #2d4455;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 86, 109, 0.3);
}

.order-btn.secondary {
    background: #6b7280;
}

/* ========== РЕЗУЛЬТАТ ========== */
.result-box {
    margin-top: 20px;
    padding: 20px;
    background: #f0f4f8;
    border: 2px solid #3A566D;
    border-radius: 8px;
}

.price-display,
.lead-time-display {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    padding: 15px;
    background: #FFFFFF;
    border-radius: 6px;
}

.price-value {
    font-size: 24px;
    font-weight: bold;
    color: #3A566D;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.result-actions .order-btn {
    flex: 1;
}

/* ========== МОДАЛЬНОЕ ОКНО ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #3A566D;
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 600px) {
    .metal-structures-calculator {
        max-width: 100%;
        padding: 15px;
        border-radius: 0;
    }
    
    .dimensions-grid {
        grid-template-columns: 1fr;
    }
    
    .price-display,
    .lead-time-display {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-actions {
        flex-direction: column;
    }
}