/* PAGE BACKGROUND */
body {
    background: #F2F2F2;
    font-family: Arial, sans-serif;
    margin: 20px;
}

/* HEADINGS */
h2, h3 {
    color: #004B2D;
}

/* SITE HEADER */
header.site-header {
    margin: auto;
    width: 50%;
    padding: 10px;
}

/* FILTER TOGGLE */
.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    margin-bottom: 8px;
}

.filter-toggle .arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
    transition: transform 0.25s ease;
}

.filter-toggle.open .arrow {
    transform: rotate(180deg);
}

.filter-panel {
    border: 1px solid #ccc;
    padding: 8px 10px;
    margin-bottom: 12px;
    background: #f7f7f7;
}

.filter-panel label {
    display: inline-block;
    margin-right: 12px;
    margin-bottom: 6px;
}

.filter-panel input[type="date"],
.filter-panel select {
    padding: 2px 4px;
    font-size: 0.9em;
}

.clear-filters {
    margin-top: 1em;
    text-align: left;
}

.clear-btn,
.clear-date button {
    background-color: #006b3f;
    color: #fff;
    border: 1px solid #004f2d;
    padding: 6px 12px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.clear-btn:hover,
.clear-date button:hover {
    background-color: #008f52;
    border-color: #006b3f;
}

/* WORKINGS TABLE (full width) */
table.workings {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    background: white;
    border: 2px solid #006341;
}

table.workings th,
table.workings td {
    border: 1px solid #ccc;
    padding: 4px 6px;
    font-size: 0.9em;
}

table.workings th {
    background: #006341;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 10px;
    border-bottom: 3px solid #FFCC00;
    position: sticky;
    top: 0;
    z-index: 2;
}

table.workings th a {
    color: #fff;
    text-decoration: none;
}

table.workings th a:hover {
    text-decoration: underline;
}

table.workings tr:nth-child(even) {
    background: #F2F2F2;
}

table.workings tr:nth-child(odd) {
    background: #FFFFFF;
}

/* PAGINATION */
.pagination a,
.pagination strong {
    margin-right: 4px;
}

.pagination a {
    padding: 4px 8px;
    border: 1px solid #006341;
    background: #FFFFFF;
    color: #006341;
    border-radius: 3px;
}

.pagination a:hover {
    background: #FFCC00;
    color: #004B2D;
}

.pagination strong {
    padding: 4px 8px;
    background: #006341;
    color: white;
    border-radius: 3px;
}
.pagination {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.page-btn {
    padding: 6px 12px;
    background: #eee;
    border: 1px solid #ccc;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
}

.page-btn:hover {
    background: #ddd;
}

.page-btn.active {
    background: #005f30;      /* Freightliner green */
    border-color: #003d1e;
    color: #fff;
    font-weight: bold;
}
/* RETURN LINK */
.return-link {
    font-weight: bold;
    color: #006341;
    display: inline-block;
    margin-top: 20px;
}

/* FLEET GRID TABLE */
.fleet-table {
    width: 90%;
    margin: 0 auto 20px auto;
    border-collapse: collapse;
    background: #FFFFFF;
    border: 2px solid #006341;
}

.fleet-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #CCCCCC;
    font-weight: bold;
    background: #F2F2F2;
}

.fleet-table tr:nth-child(even) td {
    background: #FFFFFF;
}

.fleet-table a {
    color: #006341;
    text-decoration: none;
    font-weight: bold;
}

.fleet-table a:hover {
    color: #FFCC00;
    text-decoration: underline;
}


/* EDIT BUTTONS */
.edit-buttons {
    padding-top: 10px;
}

.edit-buttons button {
    background-color: #006b3f;
    color: #fff;
    border: 1px solid #004f2d;
    padding: 6px 12px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.edit-buttons .cancel-btn {
    background-color: #c00;
    border-color: #900;
}

.edit-buttons .cancel-btn:hover {
    background-color: #e60000;
}

/* COMPARE TABLE */
.compare-table {
    width: 520px;
    margin: 20px 0;      /* was 20px auto; */
    border: 2px solid #4CAF50;
    border-collapse: collapse;
    background-color: #f9fff9;
    font-family: Arial, sans-serif;
    font-size: 13px;
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

.compare-table th {
    background: #006341;
    color: #fff;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 3px solid #FFCC00;
    font-weight: bold;
}

.compare-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #ccc;
}

.compare-table .changed-row {
    background-color: #fff8cc;
}

.compare-table .arrow {
    color: #999;
    font-weight: bold;
    margin-left: 6px;
}

.arrow {
    color: #008f52;
    font-weight: bold;
    padding: 0 4px;
}

/* MESSAGES */
.no-workings {
    margin: 20px 0;
    padding: 12px;
    background: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-weight: bold;
    color: #333;
}

.error-box {
    background: #ffe0e0;
    border: 1px solid #c00;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    color: #900;
}

.update-banner {
    background: #d4f8e3;
    border: 1px solid #2e8b57;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-weight: bold;
    color: #004f2d;
}
/* Force the edit form table to be compact */


/* EDIT FORM (compact table) */
/* Compact edit form table – aligned left with green border */
.edit-table {
    width: 520px;                 /* fixed compact width */
    border-collapse: collapse;
    margin-left: 0;               /* align left */
    margin-right: 0;
    background: white;
    border: 2px solid #006341;    /* Freightliner green border */
}

.edit-table td {
    padding: 6px 10px;
    vertical-align: top;
}

.edit-table label {
    font-weight: bold;
    color: #004f2d;
    display: inline-block;
    min-width: 140px;
}

.edit-table input[type="text"] {
    width: 280px;
    padding: 5px;
    border: 1px solid #999;
    border-radius: 4px;
    font-size: 14px;
}

.edit-table textarea {
    width: 400px;
    padding: 5px;
    border: 1px solid #999;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
}
.thumb-box {
    width: 200px;
    text-align: center;
}

.thumb-box img {
    width: 200px;
    height: auto;
    border: 1px solid #ccc;
    transition: 0.2s;
    cursor: pointer;
}

.thumb-box img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px #666;
}

.thumb-caption {
    margin-top: 6px;
    font-size: 14px;
    color: #333;
}
.filter-bar {
    margin-bottom: 20px;
}

.filter-bar select,
.filter-bar button {
    padding: 6px 10px;
    font-size: 14px;
}

.pagination {
    margin-top: 25px;
    font-size: 16px;
}

.pagination a {
    margin: 0 8px;
    text-decoration: none;
    color: #006600;
}

.pagination span {
    margin: 0 8px;
    font-weight: bold;
}

button.green {
    background-color: #4CAF50;
    color: white;
    padding: 6px 12px;
    border: none;
    cursor: pointer;
}

button.red {
    background-color: #d9534f;
    color: white;
    padding: 6px 12px;
    border: none;
    cursor: pointer;
}
.autocomplete-box {
    position: relative;
    width: 200px;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    max-height: 180px;
    overflow-y: auto;
    z-index: 9999;
}

.autocomplete-item {
    padding: 6px 8px;
    cursor: pointer;
}

.autocomplete-item:hover {
    background: #e6f7ff;
}

/* Freightliner colour palette */
:root {
    --fl-green: #005f30;
    --fl-green-dark: #004524;
    --fl-yellow: #ffcc00;
    --fl-text-light: #ffffff;
}

/* Container */
.fl-nav {
    background: var(--fl-green);
    border-bottom: 4px solid var(--fl-yellow);
    padding: 0;
    margin: 0 0 20px 0;
    font-family: Arial, Helvetica, sans-serif;
}

/* Layout */
.fl-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

/* Items */
.fl-nav li {
    margin: 0;
}

/* Links */
.fl-nav a {
    display: block;
    padding: 14px 22px;
    color: var(--fl-text-light);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: background 0.2s, color 0.2s;
}

/* Hover */
.fl-nav a:hover {
    background: var(--fl-green-dark);
    color: var(--fl-yellow);
}

/* Active page */
.fl-nav a.active {
    background: var(--fl-yellow);
    color: #000;
}
/* Freightliner Sort Dropdown */
.fl-sort-form {
    margin: 10px 0 20px 0;
}

.fl-sort-label {
    font-weight: bold;
    color: #004524; /* Freightliner dark green */
    font-size: 15px;
}

.fl-sort-select {
    margin-left: 8px;
    padding: 6px 10px;
    font-size: 14px;
    border: 2px solid #005f30; /* Freightliner green */
    border-radius: 4px;
    background: #ffffff;
    color: #003d1e;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.fl-sort-select:hover {
    border-color: #ffcc00; /* Freightliner yellow */
    background: #f7f7f7;
}

.fl-sort-select:focus {
    outline: none;
    border-color: #ffcc00;
    box-shadow: 0 0 4px rgba(255, 204, 0, 0.7);
}