/* General Reset */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    height: 100%;
}

/* Body Styling */
body {
    background-color: #f4f4f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding: 20px;
    margin-top: 80px; /* Adjusted for the fixed navbar */
    padding-top: 60px; /* Adjust this value based on your navbar height */
}

/* Main container */
.container {
    width: 90%; /* Allow the container to take 90% of the screen width */
    max-width: 1200px; /* Set a max-width to prevent the container from becoming too wide on large screens */
    margin: 0 auto; /* Center the container */
    padding: 20px;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add subtle shadow for a nice look */
    border-radius: 8px;
}

/* Success message */
.message {
    padding: 10px;
    margin: 10px 0;
    background-color: #4CAF50; /* Green for success */
    color: white;
    border-radius: 5px;
    text-align: center;
}

.message.info {
    background-color: #2196F3; /* Blue for general info */
}

.message.warning {
    background-color: #ff9800; /* Orange for warnings */
}

.message.error {
    background-color: #f44336; /* Red for errors */
}

/* Navbar Styling */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #2f3b4c; /* Dark background color for the navbar */
    z-index: 1000;
    padding: 15px 0; /* Adjust the padding to give the navbar some height */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Add some shadow below the navbar */
    display: flex;
    justify-content: center; /* Centers the buttons horizontally */
    align-items: center;
    gap: 15px; /* Space between the links */
}

/* Flexbox Row Styling for Navigation (Buttons) */
.navbar a {
    display: inline-block; /* Ensure they behave like buttons */
    background-color: #007BFF; /* Button background color */
    border: 1px solid #0056b3; /* Button border */
    color: white; /* Text color */
    padding: 12px 20px; /* Padding inside the button */
    border-radius: 5px; /* Rounded corners */
    text-align: center; /* Center the text inside the button */
    text-decoration: none; /* Remove underline from links */
    cursor: pointer; /* Pointer cursor on hover */
    font-size: 16px; /* Font size */
    transition: background-color 0.3s, box-shadow 0.3s; /* Transition for hover effect */
    margin: 0 10px; /* Space between the buttons */
}

/* Button Hover Effect */
.navbar a:hover {
    background-color: #0056b3; /* Darker background on hover */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow effect */
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f4f4f4;
    font-weight: bold;
}

tr:hover {
    background-color: #f1f1f1;
}

.red {
    background-color: #ffcccc;
}

.yellow {
    background-color: #ffffcc;
}

.green {
    background-color: #ccffcc;
}

/* Button Styling for Forms */
button[type="submit"], .filter-form button, .table-button .button {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

button[type="submit"]:hover, .filter-form button:hover, .table-button .button:hover {
    background-color: #0056b3;
}

/* Form Layout and Styling */
.form-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}

.form-row label {
    font-size: 14px;
    margin-right: 10px;
    width: 150px;
}

.form-row input, .form-row select, .form-row textarea {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 250px;
}

.form-row textarea {
    resize: vertical;
    width: 65%;
}

.form-row button {
    width: 100%;
}

/* Thumbnails */
.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap; /* Ensure the images wrap in small screens */
}

.thumbnails img {
    max-width: 150px;
    height: auto;
    border-radius: 8px;
}

.photo-container {
    position: relative;
    display: inline-block;
    margin-right: 10px;
}

.delete-form {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
    display: none;
}

/* Modal Styles Thumbnail */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #f1f1f1;
    text-decoration: none;
    cursor: pointer;
}



/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: nowrap; /* Ensure buttons stay in a single row */
        white-space: nowrap; /* Prevent text from wrapping */
        padding: 5px 0; /* Adjust padding for more compact navbar */
        justify-content: space-between; /* Evenly space buttons across the navbar */
    }

    .navbar a {
        padding: 10px 20px; /* Maintain button size for readability */
        margin: 0 5px; /* Reduced margin between buttons */
        font-size: 14px; /* Adjust font size for smaller screens */
    }

    .thumbnails {
        justify-content: center; /* Center images on smaller screens */
    }
}

/* Table Scroll for Smaller Screens */
@media (max-width: 480px) {
    th, td {
        font-size: 12px;
        padding: 6px;
    }
}

/* Vehicle and Reminder Specific Sections */
.vehicle-group, .vehicle-info, .vehicle-services, .vehicle-reminder {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.vehicle-info form, .filter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Reminder Columns */
.reminder-columns {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.reminder-column {
    width: 48%;
}

/* Receipt and Invoice Styling */
.receipt-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.receipt-thumbnail img:hover {
    transform: scale(1.05);
}

/* Filter Forms and Buttons */
.filter-form input[type="date"] {
    padding: 5px;
    font-size: 14px;
}
