/* style.css - Стили конфигуратора под сайт x-system.ru */

/* Общие стили */
body {
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1e293b;
    line-height: 1.5;
}


/* ======= СТИЛИ ДЛЯ ФОРМЫ ======= */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
    font-size: 14px;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 200px;
}

/* Стили для сообщений об успехе/ошибке */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin: 0 40px 20px 40px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Стили для поля телефона (маска ввода) */
input[type="tel"] {
    font-family: inherit;
}

/* Адаптивность для формы */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 16px;
    }
    
    .alert {
        margin: 0 20px 20px 20px;
    }
    
    .form-input,
    .form-textarea {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* Добавляем отступы по бокам для всего контента */
.configurator-wrapper {
    max-width: 1300px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

/* Заголовок как на x-system.ru */
.configurator-header {
    padding: 24px 40px;  /* Увеличил горизонтальные отступы */
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
}

.configurator-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.configurator-header .subtitle {
    font-size: 15px;
    color: #475569;
    margin: 0;
}

/* Основная сетка с отступами по бокам */
.configurator-grid {
    display: flex;
    gap: 30px;
    padding: 40px;  /* Увеличил отступы со всех сторон */
}

/* Левая панель с опциями */
.options-panel {
    flex: 2;
    background: #ffffff;
}

.option-group {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #edf2f7;
}

.option-group:last-child {
    border-bottom: none;
}

.option-label {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #0f172a;
    margin-bottom: 12px;
}

/* Селекты как на сайте */
.option-select {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' 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 16px center;
    background-size: 16px;
}

.option-select:hover {
    border-color: #94a3b8;
}

.option-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Радио кнопки */
.radio-group {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #334155;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    margin: 0;
}

/* Чекбоксы */
.multiselect-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #334155;
    cursor: pointer;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 10px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #f1f5f9;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    margin: 0;
}

/* Правая панель с итогом */
.summary-panel {
    flex: 1;
    background: #f8fafc;
    padding: 24px;
    border-radius: 16px;
    position: sticky;
    top: 30px;
    height: fit-content;
    border: 1px solid #edf2f7;
}

.summary-panel h3 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

/* Список выбранных комплектующих */
.selected-items {
    min-height: 120px;
    max-height: 350px;
    overflow-y: auto;
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.selected-items ul {
    margin: 0;
    padding-left: 20px;
}

.selected-items li {
    margin-bottom: 8px;
    font-size: 14px;
    color: #334155;
}

.selected-items li:last-child {
    margin-bottom: 0;
}

.no-items {
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
    margin: 0;
}

/* Цена */
.total-price {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 20px 0;
    padding: 16px 0;
    border-top: 2px solid #e2e8f0;
    border-bottom: 2px solid #e2e8f0;
}

.total-price span:first-child {
    font-size: 16px;
    font-weight: 500;
    color: #475569;
}

.total-price span:last-child {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

/* Кнопки */
.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: inline-block;
    padding: 14px 24px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    width: 100%;
    box-sizing: border-box;
}

.btn-primary {
    background: #0f172a;
    color: white;
}

.btn-primary:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-secondary {
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .configurator-grid {
        flex-direction: column;
        padding: 30px;  /* Уменьшенные отступы на планшетах */
    }
    
    .summary-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .configurator-header {
        padding: 20px;  /* Меньшие отступы на мобильных */
    }
    
    .configurator-header h1 {
        font-size: 24px;
    }
    
    .configurator-grid {
        padding: 20px;  /* Минимальные отступы на мобильных */
    }
    
    .multiselect-group {
        grid-template-columns: 1fr;
    }
    
    .total-price span:last-child {
        font-size: 24px;
    }
}

/* Стили для цен в селектах */
.option-select option {
    padding: 10px;
}

/* Стили для подсказок */
.price-note {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

/* Акцентные элементы */
.accent-text {
    color: #0f172a;
    font-weight: 600;
}

.highlight {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 500;
}

/* Стили для формы */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Стили для сообщений об успехе/ошибке */
.alert {
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Стили для кнопки отправки */
.btn-primary {
    background: #0f172a;
    color: white;
    border: none;
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}