/* Basic styling for background and centering */
body {
    font-family: Arial, sans-serif;
    background-color: #f7f7f7;
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    align-items: center;
    justify-content: flex-start; /* Align items from the top */
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

input, button {
    transition: all 0.3s ease;
}

input::placeholder {
    color: #aaa; /* Light gray for visibility */
    font-style: italic;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

p {
    font-size: 1.1em;
    margin: 0.5em 0;
}

/* #emailFeedback {
    color: #28a745; 
    font-size: 0.9em;
} */

#messageContainer p {
    font-size: 0.9em; /* Adjust font size */
    color: red; /* Default error message color */
    margin: 5px 0; /* Add spacing */
}

#messageContainer p.error-message {
    background-color: #ffe6e6; /* Light red background */
    padding: 8px;
    border-radius: 4px;
}

#passwordFeedback {
    font-size: 0.9em;
    transition: color 0.3s ease;
}

#total_hours {
    font-weight: bold;
    background-color: #f9f9f9;
    color: #333;
    border: 2px solid #ccc;
    text-align: center;
    margin-top: 10px; /* Add some space above */
}

/* Button styling */
.btn {
    padding: 10px 20px;
    font-size: 1em;
    color: #fff;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    text-align: center;
    width: 150px; /* Ensures consistent button width */
}

/* Hover effect */
.btn:hover {
    background-color: #0056b3; /* New color on hover */
}

.center-container {
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    justify-content: center;
    align-items: center;
    height: 50vh; /* Half of full screen height */
    margin: 0;
}

.center-container h2 {
    margin-bottom: 1em;
    font-size: 1.5em;
    color: #333;
}
 
.error-message {
    color: red;
    font-weight: bold;
    margin-bottom: 1em;
    text-align: center;
}

/*.form-buttons {
    gap: 1rem; 
} */

/* Button styling within the form container */
.form-buttons {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.form-buttons input[type="submit"],
.form-buttons button {
    padding: 10px 20px;
    width: 48%;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

/* Submit button styling */
.form-buttons input[type="submit"] {
    background-color: #007BFF;
    color: #fff;
}

.form-buttons input[type="submit"]:hover {
    background-color: #0056b3;
}

/* Cancel button styling */
.form-buttons button {
    background-color: #ccc;
    color: #333;
}

.form-buttons button:hover {
    background-color: #999;
}

/* Button focus styling for accessibility */
.form-buttons input[type="submit"]:focus,
.form-buttons button:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* Form container styling */
.form-container {
    background: #fff;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    margin-bottom: 20px; /* Add space below the form */
}

/* Title styling */
.form-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 1em;
}

.form-container input[type="number"] {
    width: 100%; /* Makes input fields stretch to the container's width */
    box-sizing: border-box; /* Ensures padding and borders are included in the width */
    padding: 8px; /* Add padding for better appearance */
    font-size: 1em; /* Ensures consistency in font size */
    border: 1px solid #ccc; /* Default border styling */
    border-radius: 4px; /* Optional: for rounded corners */
}

/* Label styling */
.form-container label {
    display: block;
    margin-top: 1.0em;
    font-weight: bold;
    color: #555;
}

/* General Styling for Inputs */
.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container input[type="number"],
.form-container input[type="tel"],
.form-container input[type="date"],
.form-container select {
    width: 100%;
    padding: 8px;
    margin-top: 0.3em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.form-container input:focus,
.form-container select:focus {
    border-color: #007BFF;
}

.form-container input:hover,
.form-container select:hover {
    background-color: #f1f1f1;
}

/* Number Input Spinner Hidden */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Style for inline messages */
.info-message {
    color: red; /* Red text for errors */
    font-size: 0.9em; /* Smaller font size */
    margin-top: 15px; /* Space between the phone field and the message */
}

.link {
    color: #007BFF;
    text-decoration: none;
    font-size: 0.9em;
}

.link:hover {
    text-decoration: underline;
    color: #0056b3;
}

.result-container {
    background: #fff;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
}

.result-container h3 {
    margin-bottom: 1em;
    text-align: center;
    color: #333;
}

.result-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}

.result-container th, .result-container td {
    padding: 0.75em;
    text-align: left;
    border: 1px solid #ccc;
}

.result-container th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.search-results table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.search-results th, .search-results td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
}

.search-results th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.search-results td {
    vertical-align: middle;
}

/* Success message styling */
.success-message {
    color: green;
    font-weight: bold;
    margin-bottom: 1em;
    text-align: center;
}

.table-container {
    margin-top: 2em;
}

.table-container h3 {
    margin-bottom: 1em;
    text-align: center;
    color: #333;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}

.table-container th, .table-container td {
    padding: 0.75em;
    text-align: left;
    border: 1px solid #ccc;
}

.table-container th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.update-link {
    color: #007BFF;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: normal;
    transition: color 0.3s ease;
}

.update-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

:focus {
    outline: 3px solid #ffcc00; /* Bright color for better visibility */
    outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
    .form-buttons input[type="submit"]:hover,
    .form-buttons button:hover {
        background-color: #004a99;
    }
}

/* Responsive Styling */
@media (max-width: 600px) {
    .form-container {
        max-width: 90%;
        padding: 1.5em;
    }

    /* Buttons and Form Fields Adjustments */
    .form-buttons input[type="submit"],
    .form-buttons button {
        width: 100%;
        margin-top: 0.5em;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }

    .form-container {
        background: #2a2a2a;
        color: #f0f0f0;
    }
}

