Book Appointment - DR. Ashok Cardiac Care
body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: #333;
max-width: 100%;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
.form-container {
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 25px;
max-width: 600px;
margin: 0 auto;
}
h2 {
color: #2a5885;
text-align: center;
margin-bottom: 25px;
font-size: 24px;
}
.clinic-info {
text-align: center;
margin-bottom: 20px;
font-size: 16px;
color: #555;
}
.form-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #444;
}
input[type="text"],
input[type="tel"],
input[type="email"],
textarea,
select {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
textarea {
height: 100px;
resize: vertical;
}
.btn-submit {
background-color: #2a5885;
color: white;
border: none;
padding: 12px 20px;
font-size: 16px;
border-radius: 4px;
cursor: pointer;
width: 100%;
transition: background-color 0.3s;
}
.btn-submit:hover {
background-color: #1e3c6a;
}
.required {
color: #e74c3c;
}
@media (max-width: 480px) {
.form-container {
padding: 15px;
}
h2 {
font-size: 20px;
}
input[type="text"],
input[type="tel"],
input[type="email"],
textarea,
select {
padding: 10px;
font-size: 14px;
}
.btn-submit {
padding: 10px 15px;
font-size: 14px;
}
}
document.getElementById('appointmentForm').addEventListener('submit', function(e) {
e.preventDefault();
// Basic form validation
const name = document.getElementById('name').value.trim();
const mobile = document.getElementById('mobile').value.trim();
const time = document.getElementById('time').value;
if (!name) {
alert('Please enter your name');
return;
}
if (!mobile || !/^\d{10}$/.test(mobile)) {
alert('Please enter a valid 10-digit mobile number');
return;
}
if (!time) {
alert('Please select a preferred time slot');
return;
}
// Here you would typically send the form data to your server
// For demonstration, we'll just show a success message
alert('Appointment request submitted successfully!\nDr. Ashok Cardiac Care will contact you shortly.');
this.reset();
});