/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Main Form Container */
.form-container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

/* Header */
.form-header {
    text-align: center;
    margin-bottom: 25px;
}
.logo {
    max-width: 120px;
    margin-bottom: 15px;
}
.form-header h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

/* Fieldset and Legend */
fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
legend {
    padding: 0 10px;
    font-weight: bold;
    color: #007bff;
}

/* Form Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s;
}
input:focus, textarea:focus, select:focus {
    border-color: #007bff;
    outline: none;
}
textarea {
    resize: vertical;
}

/* Existing Visitor Section */
.existing-visitor-section {
    background-color: #e9f5ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
#fetch-visitor-box {
    display: flex;
    gap: 10px;
    width: 100%;
}
#fetch-visitor-box.hidden {
    display: none;
}
#fetch-btn {
    padding: 10px 15px;
    border: none;
    background-color: #28a745;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

/* Captcha */
.captcha-box {
    display: flex;
    align-items: center;
    gap: 15px;
}
.captcha-box span {
    font-weight: bold;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}
.submit-btn:hover {
    background-color: #0056b3;
}

/* Message Box */
#form-message {
    text-align: center;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-weight: bold;
}
.success {
    background-color: #d4edda;
    color: #155724;
}
.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Footer */
.form-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: #888;
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .form-container {
        padding: 20px;
    }
    .captcha-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}