/* General Page Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
}

header {
    background-color: #0078d4;
    color: white;
    padding: 1em 2em;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2em;
}

header h2 {
    margin: 0.5em 0 0;
    font-size: 1.2em;
}

/* Add Vehicle Form Styling */
form {
    margin: 2em auto;
    padding: 1.5em;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #ffffff;
    max-width: 600px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

form h3 {
    margin-bottom: 1em;
    color: #333;
    text-align: center;
}

form label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
    color: #333; /* Ensures good contrast */
}

form input, form select, form textarea {
    width: 100%;
    padding: 0.7em;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
    background-color: #fff;
    color: #333; /* Ensures text is readable */
}

form button {
    width: 100%;
    padding: 0.8em;
    background-color: #0078d4;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

form button:hover, form button:focus {
    background-color: #005a9e;
    outline: 3px solid #fff; /* Visible focus indicator */
}

form input:focus, form select:focus, form textarea:focus {
    border-color: #0078d4;
    outline: none;
}

/* Refresh Button Styling */
#refreshButton {
    display: block;
    margin: 1em auto 2em;
    padding: 0.8em 2em;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#refreshButton:hover, #refreshButton:focus {
    background-color: #218838;
    outline: 3px solid #fff; /* Visible focus indicator */
}

/* Vehicle Table Styling */
table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

thead {
    background-color: #0078d4;
    color: white;
}

thead th {
    padding: 0.8em;
    font-size: 1em;
    text-align: left;
}

tbody tr:nth-child(odd) {
    background-color: #f4f4f9;
}

tbody tr:nth-child(even) {
    background-color: #e9ecef;
}

tbody td {
    padding: 0.8em;
    border: 1px solid #ccc;
    font-size: 0.9em;
}

/* Center the content */
main {
    margin: 0 auto;
    max-width: 1000px;
}

/* Focus styling for interactive elements */
button, a, input, select, textarea {
    outline: none;
}

button:focus, a:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid #005a9e; /* Strong focus indicator */
}

/* Ensure good contrast between background and text */
body {
    color: #333; /* Dark text for light backgrounds */
    background-color: #f4f4f9; /* Light background for contrast */
}

table {
    background-color: #fff;
}

th, td {
    color: #333; /* Dark text on light table background */
}

/* Ensure links have a distinguishable focus state */
a {
    text-decoration: none;
    color: #0078d4;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: #005a9e;
}

/* Visual enhancements for better readability */
input[type="text"], input[type="email"], input[type="number"], textarea, select {
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
    border-color: #0078d4;
    box-shadow: 0 0 2px 2px rgba(0, 120, 212, 0.5);
}

/* Improve contrast for hover and focus states */
button:hover, button:focus {
    background-color: #005a9e;
    border-color: #005a9e;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
    background-color: #e9ecef;
    border-color: #005a9e;
}
