Ремонт квартир и офисов Оставьте заявку на бесплатный замер
Мы перезвоним вам в течение 15 минут
/* style.css */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f4f7f6;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.feedback-section {
background: #fff;
padding: 40px;
border-radius: 12px;
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
max-width: 450px;
width: 100%;
text-align: center;
}
h2 {
color: #333;
margin-bottom: 10px;
}
p {
color: #666;
margin-bottom: 30px;
}
.contact-form {
display: flex;
flex-direction: column;
gap: 15px;
}
input[type="text"],
input[type="tel"] {
padding: 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 16px;
}
.consent-wrapper {
display: flex;
align-items: flex-start;
gap: 10px;
text-align: left;
font-size: 14px;
color: #555;
margin: 10px 0;
}
.consent-wrapper input {
margin-top: 4px;
cursor: pointer;
}
.consent-wrapper a {
color: #007bff;
text-decoration: none;
}
button {
background-color: #ff9800; /* «Строительный» оранжевый */
color: white;
padding: 15px;
border: none;
border-radius: 6px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
transition: background 0.3s;
}
button:hover {
background-color: #e68a00;
}
button:disabled {
background-color: #ccc;
cursor: not-allowed;
}
.hidden { display: none; }
.success-msg { color: green; margin-top: 15px; }
// script.js
document.getElementById('contactForm').addEventListener('submit', function(e) {
e.preventDefault(); // Предотвращаем перезагрузку страницы
const checkbox = document.getElementById('consentCheckbox');
const messageBox = document.getElementById('formMessage');
const name = document.getElementById('userName').value;
const phone = document.getElementById('userPhone').value;
// Проверка чекбокса (на случай, если HTML-валидация не сработала)
if (!checkbox.checked) {
alert("Пожалуйста, подтвердите согласие на обработку данных.");
return;
}
// Имитация отправки данных на сервер
console.log("Отправка данных:", { name, phone });
// Показываем сообщение об успехе
messageBox.textContent = "Спасибо! Мы скоро с вами свяжемся.";
messageBox.className = "success-msg";
// Очищаем форму
this.reset();
});