* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

body {
    background-color: #f7f7f7;
    color: #333;
    font-family: 'Arial', sans-serif;
}

.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 40px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.destination-header {
    background-color: #e6f2ff;
    padding: 5px 10px;
    cursor: pointer;
}

.hidden {
    display: none;
}

.destination-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out;
    background-color: #f7f7f7;
}

.destination {
    border: 1px solid #e0e0e0;
    padding: 5px;
    margin-bottom: 5px;
}

.destination label {
    display: block;
    margin-bottom: 5px;
}
.debug-section {
    margin-bottom: 20px;
    border: 1px solid #ccc;
    padding: 10px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1e3c72;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}
        .navbar {
            overflow: hidden;
            background-color: #35424a; /* Dark blue background */
            box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Adds a shadow to the navbar */
        }

        .navbar a {
            float: left;
            display: block;
            color: white;
            text-align: center;
            padding: 14px 20px;
            text-decoration: none;
            transition: background-color 0.3s, color 0.3s; /* Smooth transition for hover effects */
        }

        .navbar a:hover, .navbar a.active {
            background-color: #e8491d; /* Highlight color for hover and active state */
            color: white;
        }

        .navbar a:not(:first-child) {
            border-left: 1px solid #aaa; /* Separates items with a line */
        }

        .navbar a:first-child {
            border-radius: 0 0 0 5px; /* Rounded corners for the first item */
        }

        .navbar a:last-child {
            border-radius: 0 0 5px 0; /* Rounded corners for the last item */
        }


input[type="text"],
input[type="number"],
input[type="date"],
textarea {
    width: 100%;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 6px;
    color: #333;
    font-size: 16px;
}

input[type="submit"], button[type="button"] {
    background-color: #1e3c72;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    width: 40%;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-wrapper label {
    margin-left: 10px;
}

.button-container {
  display: flex;
}

.submit-button {
    width: auto !important;
    background-color: #426ab3 !important;
}

.custom-button {
    padding: 15px 32px;
    border: none;
    background-color: #1e3c72; /* Matches existing buttons */
    color: white;
    height: auto; /* Explicitly set the height */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
    overflow: visible;  /* Add this line */
}
    .hidden-file-input {
        opacity: 0;
        position: absolute;
        z-index: -1;
}

.regular-button, .submit-button {
    flex: 1;
    margin: 3px;
}
.cancel-button {
    display: inline-block;
    padding: 15px 32px;
    border: none;
    background-color: #1e3c72; /* Matches existing buttons */
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    width: 40%; /* Matches existing buttons */
}
#deliveryChart {
    max-width: 100%;
    height: 100%;
}

/* Trip log table */
.trip-log-table {
    width: 100%;
    border-collapse: collapse;
    color: #333;
}

.trip-log-table th,
.trip-log-table td {
    width: auto;  /* or set to a specific width */
    border: 1px solid #e0e0e0;
    padding: 8px;
    text-align: left;
}

.trip-log-table th {
    background-color: #e6f2ff;
    font-weight: bold;
}

.trip-log-table tr:nth-child(even) {
    background-color: #f7f7f7;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
}

th, td {
    border: 1px solid #e0e0e0;
    padding: 8px;
    text-align: left;
    color: #333;
}

th {
    background-color: #e6f2ff;
}

tr:nth-child(even) {
    background-color: #f7f7f7;
}

input[type="datetime-local"] {
    width: auto;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 6px;
    color: #333;
    font-size: 16px;
}

.search-results-list {
    list-style: none;
}

.search-result {
    padding: 10px;
    cursor: pointer;
    border: 1px solid #e0e0e0;
    background-color: #f5f5f5;
    margin-bottom: 5px;
}

.search-result:hover {
    background-color: #e6e6e6;
}

.trip-report {
    display: none;
}
.toggle-trip.add-trip-button {
    background-color: #4CAF50; /* Green */
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    float: left; /* To move it to the left */
}


/* Flex container for the username and logout button */
.header-right {
    display: flex;
    align-items: center; /* Vertically center aligns the child items */
    position: absolute;
    top: 20px;
    right: 20px;
}

.header-section {
    display: flex;
    justify-content: space-between;  /* Pushes title to left and user details to right */
    align-items: center;  /* Vertically aligns the items in the middle */
}

.user-section {
    display: flex;
    align-items: center;  /* Vertically aligns the username and the button */
}

.username-display {
    margin-right: 20px; /* Adds space between the username and the logout button */
    font-weight: bold;  /* Makes the username bold for emphasis */
}

.logout-button {
    min-width: 100px;
    width: auto;
    background-color: #FF4500;
    border: none;
    color: white;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    text-align: center;
    display: inline-block;
}

.logout-button {
    min-width: 100px; /* Set a minimum width */
    width: auto; /* Allow it to adjust if the content inside is larger than the minimum width */
    background-color: #FF4500;
    border: none;
    color: white;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    text-align: center;
    display: inline-block;
    margin-left: 10px; /* Space between the username and the button */
}

.logout-button:hover {
    background-color: #FF6347;
}

.username-display {
    font-weight: bold;  /* Makes the username bold for emphasis */
}

/* Login Button */
.login-button {
    width: auto !important; /* Override width */
    background-color: #FF4500;
    border: none;
    color: white;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    text-align: center;
    display: inline-block;
    position: relative;
}

.login-button:hover {
    background-color: #FF6347;
}
/* Style for the toggle button */
#toggle-button {
    background-color: #1e3c72;
  color: white;
  border: none;
  padding: 10px 20px;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

/* Hover effect */
#toggle-button:hover {
    background-color: #1e3c72;
}

/* Active state */
#toggle-button:active {
    background-color: #1e3c72;
}
/* Style for the remove link */
.remove-link {
    display: inline-block;
    background-color: #1e3c72;
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-decoration: none;  /* Remove underline */
}

/* Hover effect */
.remove-link:hover {
    background-color: #1e3c72;
}

/* Active state */
.remove-link:active {
    background-color: #1e3c72;
}
/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}
        .arrow {
            cursor: pointer;
            font-size: 24px;
            margin: 20px;
            user-select: none;
        }

        .arrow:hover {
            color: gray;
        }

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.pre-delivery-button {
    background-color: #4CAF50; /* Green background */
    color: white; /* White text */
}

.pre-delivery-button:hover {
    background-color: #45a049; /* Darker green */
}

/* Print styles */
@media print {
    body {
        background-color: #fff;
        color: #000;
    }

    table, th, td {
        color: #000;
        border-color: #000;
    }

    th {
        background-color: #f2f2f2;
    }

    .print-logo {
        display: block;
        text-align: center;
        margin-bottom: 20px;
    }
    .print-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    }

    .print-title {
    font-size: 24px;
    color: #222;
    text-align: center;
    flex-grow: 1;
    margin: 0;
    }
}
