html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

/* Global background */
body {
    background: url('/images/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: white;
    font-family: Arial, sans-serif;
    margin: 0;
    height: 100vh;
}

/* Add to your site.css */
.btn-group-nav {
    gap: 0.5rem;
}

.navbar-nav .nav-link.btn {
    margin: 0 0.25rem;
    color: white;
}

.ag-theme-alpine {
    --ag-header-height: 40px;
    --ag-header-background-color: #f8f9fa;
    --ag-header-foreground-color: #212529;
    --ag-font-size: 14px;
    --ag-font-family: var(--bs-body-font-family);
}

.toast {
    opacity: 1 !important;
}

.toast-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.toast-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.update-btn, .delete-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    height: 30px;
    min-width: 120px; /* Minimum width ensures consistent size */
    text-align: center;
    text-decoration: none;
    background-color: #007bff;
    border: 1px solid #007bff;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}


/* Delete button specific styles */
.delete-btn {
    background-color: #dc3545; /* Red color for delete button */
    border-color: #dc3545;
    margin: 0px 0px 2px 0px
}

    /* Hover effects */
    .update-btn:hover, .delete-btn:hover {
        background-color: #0056b3; /* Darker blue for hover */
    }

    .delete-btn:hover {
        background-color: #c82333; /* Darker red for hover */
    }

    /* Active (pressed) effects */
    .update-btn:active, .delete-btn:active {
        transform: scale(0.95); /* Slight shrink on click */
    }

/* Center-align the content in Quantity column cells */
#orderTable td.quantity-cell {
    text-align: right; /* Center align text and inputs horizontally */
    vertical-align: middle; /* Center align vertically */
}

/* Style the input for proper alignment */
.quantity-input {
    width: 60px; /* Set a consistent width */
    text-align: center; /* Center text inside the input */
    margin: 0; /* Remove any extra margins */
    padding: 5px; /* Add padding for a better look */
    box-sizing: border-box; /* Ensure padding doesn't affect total width */
    font-size: 14px; /* Match grid font size */
}



.quantity-input {
    width: 80px;
    height: 30px;
    padding: 5px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#orderTable tbody tr td:nth-child(1) {
    font-weight: bold;
    color: darkred;
}

#orderTable tbody tr td:nth-child(2) {
    font-size: 12px; /* Adjust font size as needed */
    font-weight: bold;
    color: blue;
}

#orderTable tbody tr td:nth-child(3) {
    font-weight: bold;
    color: darkcyan;
}

#orderTable tbody tr td:nth-child(4) {
    font-weight: bold;
    text-align: right;
}

#orderTable tbody tr td:nth-child(5) {
    font-weight: bold;
    text-align: right;
}

#orderTable tbody tr td:nth-child(7) {
    font-weight: bold;
    text-align: right;
}

#orderTable tbody tr td:nth-child(8) {
    font-weight: bold;
    text-align: right;
}

/* Ensure the table container fits within the viewport */
.dataTables_wrapper {
    width: 100%;
    overflow: hidden; /* Prevent the wrapper from introducing scrollbars */
}

/* Enable scrolling for the table body */
.dataTables_scrollBody {
  /*  max-height: calc(100vh - 710px);*/ /* Adjust to account for header/footer */
    overflow-y: auto; /* Allow vertical scrolling for rows only */
    overflow-x: hidden; /* Disable horizontal scrolling */
}

/* Freeze the header row */
.dataTables_scrollHead {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #fff; /* Ensure header has a solid background */
}


/* Freeze the header row */
.table thead th {
    position: sticky;
    top: 0; /* Stick the header to the top of the container */
    z-index: 1; /* Ensure it stays above the body rows */
    background-color: #fff; /* Background color for the header */
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4); /* Optional: Add shadow for better visibility */
}

/* Ensure the table spans the full width */
.table {
    width: 100%;
    margin-bottom: 0; /* Remove excess bottom margin */
}

.card-body {
    max-height: calc(100vh - 180px); /* Adjust 200px based on header/footer size */
    overflow-y: auto; /* Enable vertical scrolling */
}

.table-container {
    max-height: calc(100vh - 200px); /* Adjust 200px based on header/footer size */
    overflow-y: auto; /* Enable vertical scrolling */
}

#orderTable_wrapper {
    height: 100%; /* Allow the table wrapper to fill the card body */
    overflow: auto; /* Ensure scrolling happens within the table container */
}

.text-danger {
    color: #ff6b6b !important; /* Bright red that shows on dark background */
}

footer.fixed-bottom {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1030; /* Ensures the footer is above other content */
}


/* Add to your existing styles */
@keyframes savedHighlight {
    0% {
        background-color: #e3f2fd; /* Light blue start */
    }

    100% {
        background-color: transparent;
    }
}

.saved-highlight {
    animation: savedHighlight 1.5s ease-out;
}

/* Add some transition for smoother effect */
#orderMemo, #pickupDate {
    transition: background-color 0.3s ease;
}

#toastContainer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    color: #fff;
    opacity: 0;
    animation: fadeInOut 4s forwards;
    pointer-events: all;
}

.toast-success {
    background-color: #28a745;
}

.toast-error {
    background-color: #dc3545;
}

.toast-info {
    background-color: #17a2b8;
}

.toast-warning {
    background-color: #ffc107;
}

.app-version {
    font-size: 11px;
    align-content: center;
    margin-right: 20px;
}