<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Заказ столика в ресторане</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<form>
<div>
<label for="name">Имя</label>
<input type="text" id="name" name="name" required>
</div>
<div>
<label for="phone">Телефон</label>
<input type="tel" id="phone" name="phone" required>
</div>
<div>
<label for="datetime">Дата и время</label>
<input type="datetime-local" id="datetime" name="datetime" required>
</div>
<div>
<label for="guests">Количество гостей</label>
<input type="number" id="guests" name="guests" min="1" max="20" required>
</div>
<div>
<label for="wishes">Пожелания</label>
<textarea id="wishes" name="wishes" rows="3"></textarea>
</div>
<button type="submit">Забронировать</button>
</form>
</body>
</html>
body {
font-family: Arial, sans-serif;
margin: 30px;
}
form {
max-width: 400px;
}
div {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
input, textarea {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
}
/* Убираем иконку календаря */
input::-webkit-calendar-picker-indicator {
display: none;
}
/* Фокус */
input:focus, textarea:focus {
outline: none;
border-color: #007bff;
}
/* Валидация */
input:invalid, textarea:invalid {
border-color: red;
}
input:valid, textarea:valid {
border-color: green;
}
/* Кнопка */
button {
padding: 10px 15px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
button:active {
transform: scale(0.95);
}