/* .top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 112rem;
    padding: 0rem;
    margin: 0 auto;
} */

.note {
    font-size: 0.7em;
    background-color: beige;
    padding: 4px;
    border-radius: 5px;
    margin-bottom: 5px;
    border: 1px solid;
    width: 100%;
}

.note-user {
    font-weight: bold;
    font-size: .8em;
    position: relative;
    top: -5px;
}

.note-created {
    float: right;
    position: relative;
    top: -5px;
    font-size: .8em;
}

.note-note {
    position: relative;
    top: -5px;
}

.note-delete {
    float: right;
    position: relative;
    top: -7px;
}

.container {
    max-width: 80%;
    padding: 0 0rem;
}

/* Use nearly the full screen width on phones so cards aren't boxed in */
@media (max-width: 768px) {
    .container {
        max-width: 95%;
    }
}

input[type='color'],
input[type='date'],
input[type='datetime'],
input[type='datetime-local'],
input[type='email'],
input[type='month'],
input[type='number'],
input[type='password'],
input[type='search'],
input[type='tel'],
input[type='text'],
input[type='url'],
input[type='week'],
input:not([type]),
textarea,
select {
    background-color: white;
}

.sort {
    background: white !important;
    color: var(--color-lightgray) !important;
    outline: none;
}

/* Custom CSS for Vehicle Sales Application */

/* Vehicle Grid Layout */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Vehicle Card Styles */
.vehicle-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 350px;
}

.vehicle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Vehicle Images Styles Start */
.large-preview-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    align-items: center;
}

.image-wrapper {
    position: relative;
    display: inline-block;
}

.large-preview-container img {
    cursor: pointer;
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.large-preview-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
    color: #666;
}

.image-action-buttons {
    position: absolute;
    bottom: 8px;
    right: 5px;
    display: flex;
}

.image-action-buttons i {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.image-action-buttons i:hover {
    background: rgba(0, 0, 0, 0.8);
}

.image-grid-container {
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    align-items: center;
}

.image-grid {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #007bff #f0f0f0;
    margin-bottom: 15px;
}

.image-grid::-webkit-scrollbar {
    height: 8px;
}

.image-grid::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.image-grid::-webkit-scrollbar-thumb {
    border-radius: 4px;
}

.image-grid::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}


.image-item {
    flex-shrink: 0;
    max-width: 130px;
    max-height: 100px;
    border-radius: 4px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    position: relative;
}

.image-item.selected {
    border: 2px solid #007bff !important;
}

.image-item:hover {
    opacity: '0.8';
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.image-actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.5rem;
}

/* Add image slot in the grid */
.add-item {
    flex-shrink: 0;
    flex: 0 0 130px;
    height: 100px;
    border-radius: 4px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    position: relative;
}

.add-image-box {
    display: flex;
    flex: 0 0 150px;
    height: 100px;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
    border-radius: 8px;
    color: #ccc;
    font-size: 2rem;
}

.add-image-box.dragover {
    border: 2px dashed #007bff;
    background: rgba(0, 123, 255, 0.05);
}

/* Unified Add/Edit Modal */
#image-modal .add-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
}

#image-modal-title {
    font-size: 3rem;
    font-style: bold;
    font-weight: bold;
}

/* Styled button inside the form (Choose File, etc.) */
.add-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    border: none;
}

.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}

#image-caption {
    text-align: center;
}

.hidden-file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.85);
    overflow: auto;
    text-align: center;
}

.modal-content {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
}

.modal-image {
    width: 80vw;
    height: auto;
    max-height: 70vh;
    border-radius: 10px;
    object-fit: contain;
    margin: 0;
}

.modal-caption {
    color: #fff;
    font-size: 1em;
    font-weight: 500;
    margin: 10px 0 5px;
    text-align: center;
}

.modal-actions .modal-pagination-btn {
    position: static;
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    padding: 6px 14px;
    margin: 0 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    cursor: pointer;
    border: 1px solid #000;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.modal-actions-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    margin: 0 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.modal-actions-button.fa-spin {
    animation: none;
}

/* Top-nav user slide-out name animation */
.top-nav-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    text-decoration: none;
    color: inherit;
    padding: 6px 8px;
    border-radius: 20px;
    overflow: visible;
}

.top-nav-user .top-user-name {
    display: inline-block;
    white-space: nowrap;
    max-width: 0;
    opacity: 0;
    transform: translateX(-12px);
    overflow: hidden;
    will-change: max-width, transform, opacity;
    transition: max-width 420ms cubic-bezier(.16, .84, .32, 1),
                opacity 260ms ease, transform 420ms cubic-bezier(.16, .84, .32, 1);
    font-weight: 600;
    margin-left: 0;
    padding-left: 0;
}

/* user icon color */
.top-nav-user .top-user-icon {
    font-size: 1.6rem;
    line-height: 1;
    display: inline-block;
    color: var(--color-links-active);
}

.top-nav-user .top-user-name {
    color: var(--color-links-active);
}

/* On hover, reveal the username sliding out from the left of the icon */
.top-nav-user:hover .top-user-name,
.top-nav-user:focus .top-user-name {
    max-width: 260px; /* larger room for longer usernames */
    opacity: 1;
    transform: translateX(0);
    margin-left: .5rem;
    padding-left: .2rem;
}

/* Small touch / reduced motion handling */
@media (prefers-reduced-motion: reduce) {
    .top-nav-user .top-user-name {
        transition: none;
        transform: none;
        opacity: 1;
        max-width: none;
        margin-left: .5rem;
    }
}

/* Inline checkbox helpers for user edit form */
.inline-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.inline-label {
    display: flex;
    align-items: center;
    gap: 6px;
}
.inline-checkbox {
    margin: 0;
    vertical-align: middle;
    transform: translateY(2px);
}

/* Login card styles */
.login-card {
    padding: 2rem;
    max-width: 520px;
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(12, 20, 30, 0.08);
}
.login-header {
    text-align: center;
    margin-bottom: 1rem;
}
.login-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: inline-block;
    margin-bottom: .25rem;
}
.login-header h2 {
    margin: 0.25rem 0 0.5rem;
}
.input-with-toggle {
    position: relative;
}
.input-with-toggle .password-toggle {
    position: absolute;
    right: 8px;
    top: 63%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px;
    color: var(--color-links-active);
}
.input-with-toggle .password-toggle:focus {
    outline: 2px solid rgba(0,0,0,0.08);
    border-radius: 6px;
}

.top-nav {
    max-width: 80%;
}

.top-nav-links a {
    margin: 0 0.2rem;
}   

/* Top nav responsive hamburger */
.top-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 6px;
    color: var(--color-links-active);
}

.top-nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 880px) {
    .top-nav-toggle { display: inline-block; }
    .top-nav-links {
        position: absolute;
        right: 12px;
        top: 64px;
        background: white;
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        border-radius: 8px;
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: stretch;
        display: none;
        min-width: 200px;
        z-index: 999;
    }
    .top-nav-links.open {
        display: flex;
    }
    .top-nav-links a { padding: 8px 6px; }
}

/* Responsive two-column form grid for user forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.modal-actions-button.fa-spin::before {
    display: inline-block;
    animation: spin 1s linear infinite;
}

.modal-actions-button:hover {
    border-color: #fff;
    background-color: #000;
}

.modal-actions-button:nth-child(3) {
    color: red;
}

.modal-actions-button:nth-child(3):hover {
    border-color: red;
}

/* Pagination */
.grid-pagination {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 10px 15px;
    border-radius: 50%;
    z-index: 10;
}

/* Modal Pagination */
.modal-pagination-btn {
    border: 1px solid transparent !important;
}

.modal-pagination-btn:hover {
    border-color: #fff !important;
    background-color: #000;
}

.modal-pagination-btn.prev {
    left: 15px;
}

.modal-pagination-btn.next {
    right: 15px;
}


#imageModal .close {
    color: #fff;
}

.close {
    position: absolute;
    color: #000;
    font-size: xx-large;
    padding-inline: 10px;
    right: 0px;
    top: 0px;

}

.close:hover,
.close:focus {
    text-decoration: none;
    cursor: pointer;
}

/* Vehicle Images Style End */
.vehicle-header {
    padding: 0px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.vehicle-title {
    font-size: 18px;
    font-weight: bold;
    color: #0066cc;
    margin: 0 0 5px 0;
}

.vehicle-code {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.vehicle-details {
    padding: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #333;
    font-size: 13px;
}

.detail-value {
    color: #666;
    font-size: 13px;
}

/* Price Section */
.price-section {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.price-current {
    font-size: 24px;
    font-weight: bold;
    color: #d9534f;
    margin: 5px 0;
}

.discount-badge {
    display: inline-block;
    background: #d9534f;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
}

/* Action Buttons */
.vehicle-actions {
    padding: 15px;
    display: flex;
    gap: 10px;
    background-color: #f8f9fa;
}

.btn-detail {
    flex: 1;
    background: #0066cc;
    color: white;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-bottom: 0px;
    height: 41px;
    border-color: blue;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.request-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.btn-detail:hover {
    /* background: #0052a3; */
    color: white;
    text-decoration: none;
}

.btn-edit {
    background: #6c757d;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-edit:hover {
    background: #545b62;
    color: white;
    text-decoration: none;
}

/* Header Section */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-vehicle-btn {
    background: #28a745;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.add-vehicle-btn:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

/* Pagination Styles */
.paginator {
    margin-top: 40px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    list-style: none;
    padding: 0;
    gap: 5px;
    margin: 0 auto;
}

.pagination li {
    display: inline;
}

.pagination a {
    display: block;
    padding: 8px 12px;
    color: #0066cc;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.pagination .active a {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.pagination .disabled a {
    color: #ccc;
    cursor: not-allowed;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: "Processing...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    z-index: 1000;
}

/* Loading button state */
.button-loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* Custom loading messages for different actions */
.loading-delete::after {
    content: "Deleting...";
}

.loading-upload::after {
    content: "Uploading...";
}

.loading-save::after {
    content: "Saving...";
}

/* General Improvements */
.content {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vehicles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .header-section {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .add-vehicle-btn {
        text-align: center;
    }

    .vehicle-actions {
        flex-direction: column;
    }

    .btn-detail {
        margin-bottom: 10px;
    }

    .pagination-info {
        font-size: 12px;
    }

    .pagination-btn {
        font-size: 8px;
        width: 10px;
        height: 10px;
        padding: 10px;
    }

    .grid-pagination {
        display: block;
        display: flex;
    }

    .modal-caption {
        font-size: 0.8em;
    }

    .modal-pagination-btn {
        display: none !important;
    }

    .add-item {
        flex: 0 0 70px;
        height: 55px;
    }

    .add-image-box {
        flex: 0 0 70px;
        height: 55px;
    }

    .image-item {
        max-width: 70px;
        max-height: 60px;
    }

    #add-image-modal .add-content,
    #edit-image-modal .add-content {
        width: 90%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 10px;
    }

    .vehicle-card {
        margin: 0 5px;
    }

    .vehicle-title {
        font-size: 16px;
    }

    .price-current {
        font-size: 20px;
    }

    .pagination-info {
        font-size: 12px;
    }

    .large-preview-caption {
        font-size: 14px;
        margin-top: 8px;
    }

    #add-image-modal .add-content,
    #edit-image-modal .add-content {
        width: 95%;
        max-width: 95%;
        padding: 12px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-height: 85vh;
        overflow-y: auto;
    }
}

#imageFormSubmit {
    background-color: red;
}

#imageFormSubmit:hover {
    background-color: grey;
}

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

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

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}


/* Invoice */
.form-label {
  white-space: nowrap;
}


/* Button Styles */
.button,
.btn {
    display: inline-block;
    padding: 0px 15px !important;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.button:hover,
.btn:hover {
    /* background: #0052a3; */
    color: white;
    text-decoration: none;
}

.button.secondary {
    background: #6c757d;
}

.button.secondary:hover {
    background: #545b62;
}

.button.success {
    background: #28a745;
}

.button.success:hover {
    background: #218838;
}

.button.danger {
    background: #dc3545;
}

.button.danger:hover {
    background: #c82333;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Logo Styles */
.logo {
    height: 150px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

/* Navigation adjustments for logo */
.top-nav-title {
    display: flex;
    align-items: center;
}

.top-nav-title a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

#no-lines-message {
  display: flex;
  flex-direction: column;   
  align-items: center;      
  text-align: center;       
  color: #6c757d;          
  margin-top: 25px;      
}
#no-lines-message i {
  margin-bottom: 0.5rem; 
}

@media print {
    .no-print {
        display: none !important;
        /* Hides the element and removes its space */
    }
}