/* style.css */
/* Basic Resets & Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa; /* Light grey background */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #007bff; /* Primary blue */
    color: #fff;
    padding: 1.5em 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2em;
    margin: 0;
}

/* Main Content & Cards */
main {
    flex-grow: 1; /* Allows main content to expand */
    padding: 30px 0;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 30px;
    overflow: hidden; /* Clear floats or contain child margins */
}

h2 {
    color: #007bff;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8em;
}

/* Vehicle Details Section */
#vehicle-details img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 25px;
    border-radius: 6px;
}

.features h3 {
    text-align: center;
    color: #555;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.features-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* Space between feature items */
}

.features-list li {
    display: flex;
    flex-direction: column; /* Stack icon and text */
    align-items: center;
    text-align: center;
    padding: 15px;
    background-color: #e9ecef; /* Light grey for feature background */
    border-radius: 6px;
    flex: 1 1 calc(33% - 20px); /* Approx 3 items per row on larger screens */
    min-width: 120px; /* Minimum width for small screens */
    max-width: 150px; /* Max width to keep them tidy */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.features-list li img {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.features-list li span {
    font-weight: 500;
    font-size: 0.95em;
    color: #343a40;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-control,
.form-control-file {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1em;
    color: #495057;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-control-file:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.form-control[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.form-control-file {
    padding: 8px 12px; /* Adjust padding for file input */
}

.input-group {
    display: flex;
    gap: 10px; /* Space between input and button */
}

.input-group .form-control {
    flex-grow: 1;
}

.manual-input {
    display: none; /* Hidden by default in JS */
    margin-top: 10px; /* Space from button/extracted input */
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 25px;
    margin-bottom: 25px; /* Added spacing */
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    min-width: 18px; /* Ensure checkbox is clickable */
    min-height: 18px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

.checkbox-group a {
    color: #007bff;
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
    width: 100%; /* Full width button */
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Calendar Styling (FullCalendar overrides) */
#calendar {
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
}

/* Adjust FullCalendar header for better spacing */
.fc-header-toolbar {
    flex-wrap: wrap; /* Allow header elements to wrap */
    justify-content: center;
    gap: 10px; /* Space between elements */
    margin-bottom: 15px;
}

.fc-button-group .fc-button {
    padding: 8px 12px;
    font-size: 0.9em;
}

.fc-daygrid-day-number {
    font-size: 0.9em;
    padding: 5px;
}

/* Make calendar cells slightly larger and more clickable */
.fc-daygrid-day {
    padding: 5px; /* Inner padding for the day cell */
}

/* --- Modal Styling FIX --- */
.modal {
    /* Critical Change: Modals are hidden by default until JavaScript adds 'modal--active' */
    display: none;
    position: fixed;
    z-index: 1000; /* High z-index to appear on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* Darker overlay */
    padding: 10px; /* Add some padding so content doesn't touch screen edges */
}

/* New Class: This is what your JavaScript will toggle to show/hide modals */
.modal.modal--active {
    display: flex; /* Show the modal as a flex container */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.modal-content {
    background-color: #fff;
    margin: auto; /* Still useful for browsers not fully supporting flex gap, but flex handles primary centering */
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px; /* Max width for larger screens */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s ease-out; /* Smooth entry */
    max-height: 95vh; /* Limit height to viewport height */
    overflow-y: auto; /* Enable scrolling if content is too long */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #007bff;
    text-align: left; /* Align modal title left */
    font-size: 1.6em;
}

.modal-content ul {
    list-style-type: disc; /* Use standard disc bullets */
    margin-left: 25px;
    margin-bottom: 20px;
}

.modal-content li {
    margin-bottom: 10px;
}

/* Specific styling for terms modal content if needed (optional) */
.modal-content-custom h2 {
    /* Adjust specific styles for the terms modal if it differs from other modals */
}

/* Custom classes for showing/hiding elements based on device type */
/* These are now largely replaced by Tailwind classes in index.html for main sections */
.desktop-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 768px) {
    .desktop-only { display: none; }
    .mobile-only { display: block; }

    header h1 {
        font-size: 1.8em;
    }

    .card {
        padding: 20px;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }

    .features-list li {
        flex: 1 1 calc(50% - 20px); /* 2 items per row on tablets */
        max-width: unset; /* Remove max-width for better two-column flow */
    }

    .form-control,
    .form-control-file,
    .btn {
        padding: 10px;
        font-size: 0.95em;
    }

    .btn-secondary {
        padding: 10px 15px; /* Adjust secondary button size on smaller screens */
    }

    .input-group {
        flex-direction: column;
        gap: 15px; /* Stack input and button */
    }

    /* Modal specific mobile adjustments */
    .modal-content {
        width: 95%; /* Wider modal on small screens */
        margin: 20px auto; /* Add vertical margin for spacing */
        padding: 20px;
    }

    .close-button {
        font-size: 28px;
        top: 10px;
        right: 15px;
    }

    /* Adjust Uppy dashboard on smaller screens if necessary */
    /* .uppy-Dashboard is removed, so this is no longer applicable */
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    main {
        padding: 20px 0;
    }

    .card {
        padding: 15px;
        margin-bottom: 15px;
    }

    h2 {
        font-size: 1.4em;
        margin-bottom: 15px;
    }

    .features-list li {
        flex: 1 1 100%; /* 1 item per row on very small phones */
        max-width: 200px; /* Keep items from stretching too wide if only one */
    }
}
