/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
    margin-top: 10px;
    flex-wrap: wrap;
    padding: 7px 9px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-group {
    display: flex;
    gap: 5px;
    min-width: 150px;
    align-self: center;
    align-items: center;
}

.filter-group label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    margin: 0;
}

.clear-filters {
    padding: 8px 16px !important;
    background-color: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    align-self: flex-end !important;
    height: 30px !important;
    min-height: 30px !important;
}

.clear-filters:hover {
    background-color: #e5e5e5;
}

.filter-select {
    padding-left: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    height: 30px;
    background-color: #fff;
    text-transform: uppercase;
}

.filter-select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 1px #ff6b35;
}


.search-container {
    position: relative;
    flex: 1;
    min-width: 200px;
    display: flex;
    justify-content: end;
}

.search-container input {
    width: 270px !important;
    padding: 10px 15px 10px 35px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background-color: #fff !important;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-icon svg {
    height: 20px;
    width: 20px;
    margin-bottom: -5px;
}

.list-selector {
    width: 20%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
}

.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: auto;
    max-width: 100%;
    height: calc(100vh - 310px);
}

table {
    width: 100%;
    border-collapse: collapse;
}

.th {
    background-color: #fff;
    padding: 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    border-bottom: 1px solid #ddd;
}

td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

tr:hover {
    background-color: #f8f9fa;
}

.thumbnail-container {
    position: relative;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: inline-block;
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    height: auto;
}

.full-image {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    background: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 200px;
    z-index: 1000;
}

.full-image img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.thumbnail-container:hover .full-image {
    display: block;
}

.stock-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.stock-badge.in-stock {
    background-color: #c6f6d5;
    color: #22543d;
}

.stock-badge.out-of-stock {
    background-color: #fed7d7;
    color: #822727;
}

.quantity-controls {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.quantity-btn {
    padding: 4px 8px !important;
    border: 1px solid #ddd !important;
    background: white !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}

.quantity-btn:hover {
    background: #f5f5f5 !important;
}

.add-to-list-btn {
    padding: 6px 12px !important;
    background-color: #ff6b35 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    margin-left: 8px !important;
}

.add-to-list-btn:hover {
    background-color: #ff5722;
}

.add-to-list-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.shopping-list {
    margin-top: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shopping-list h3 {
    margin-bottom: 15px;
    color: #333;
}

.list-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.list-item:last-child {
    border-bottom: none;
}

#productCount {
    margin: 10px 0;
    font-weight: bold;
}

#activeFilters {
    margin: 10px 0;
}

.loading {
    text-align: center;
    padding: 20px;
}


#loadingIndicator {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    /* Ensure it's on top of other content */
}

#loadingIndicator .animate-spin {
    border-radius: 50%;
    height: 2rem;
    width: 2rem;
    border: 2px solid transparent;
    border-bottom-color: #1a202c;
    /* Dark gray for the spinner */
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

td.product-name {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* DataTables Styling */
.dataTables_wrapper {
    padding: 1rem;
    position: relative;
}

.dataTables_scroll {
    background: #fff;
}

.dataTables_scrollBody {
    border-bottom: 1px solid #e2e8f0;
}

/* Fixed columns styling */
.DTFC_RightWrapper {
    background-color: #fff;
    box-shadow: -5px 0 5px rgba(0, 0, 0, 0.1);
}

.DTFC_RightBodyLiner {
    background-color: #fff;
}

.DTFC_RightHeadWrapper table.dataTable thead th,
.DTFC_RightBodyWrapper table.dataTable tbody td {
    background-color: #fff;
}

/* Table cell padding and alignment */
#productsTable th,
#productsTable td {
    padding: 12px;
    white-space: nowrap;
    vertical-align: middle;
}

/* Loading spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* DataTables controls styling */
.dataTables_length,
.dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_filter input {
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    margin-left: 0.5rem;
    min-width: 200px;
}

.dataTables_length select {
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    margin: 0 0.5rem;
}

/* Ensure inputs in fixed columns work properly */
.DTFC_RightBodyLiner input[type="number"],
.DTFC_RightBodyLiner input[type="text"] {
    width: 100%;
    min-width: 60px;
    padding: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

/* Improve table header appearance */
#productsTable thead th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}


.bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
}

.session-info {
    padding: 5px 10px;
}

.session-text {
    color: #666;
    font-size: 14px;
}

.actions-box {
    display: flex;
    align-items: center;
}

.order-category {
    padding: 8px 15px;
    border-radius: 4px;
    min-width: 90px;
    text-align: center;
}

.category-text {
    font-weight: 500;
    margin-bottom: 2px;
    color: #fff;
    text-transform: uppercase;
}

.item-amount {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.frozen-items {
    background-color: #2196F3;
}

.chilled-items {
    background-color: #00BCD4;
}

.ambient-items {
    background-color: #FF9800;
}

.fresh-items {
    background-color: #4CAF50;
}

.non-foods-items {
    background-color: #757575;
}

.copyright-info {
    color: #666;
    font-size: 13px;
}

.bottom-bar>div {
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.session-info {
    margin-right: 5px;
    padding-left: 20px;
}

.actions-box {
    display: flex;
    align-items: center;
}

.copyright-info {
    text-align: center;
    margin-right: 5px;
    justify-content: center;
    padding-left: 10px;
}

.logos-container {
    margin-left: 5px;
}

.logos-container img {
    height: 15px;
    margin-left: 2px;
}

.actions-box>div:first-child {
    border-radius: 10px 0 0 0;
}

.actions-box>div:last-child {
    border-radius: 0 10px 0 0;
}

.actions-box>div {
    padding: 10px 10px;
    box-sizing: border-box;
    height: 60px;
    justify-content: center;
    white-space: nowrap;
    border-radius: 0;
    width: 185px;
    text-align: center;
}

.limit-exceeded {
    background-color: #c50707;
}

.limit-text {
    margin-bottom: 2px;
}

.limit-amount {
    font-weight: bold;
}

.end-order {
    background-color: #f9a93b;
    border-radius: 0 !important;
}

.bottom-bar .cart-info {
    background-color: green;
    border-radius: 0px 10px 0px 0px !important;
}

.end-order img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.end-text {
    text-align: center;
}

.cart-info {
    margin-left: -1px;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    display: flex;
}

.cart-icon img {
    width: 30px;
    height: 30px;
    margin-left: 5px;
}

.cart-amounts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 10px;
}

.net-amount,
.gross-amount {
    font-size: 12px;
}

.cart-popup {
    display: none;
    position: absolute;
    bottom: 60px;
    right: 0;
    background-color: white;
    color: black;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    z-index: 10;
    min-width: 150px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.popup-top {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.popup-top img {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.go-to-cart {
    font-size: 14px;
    color: #0a4396;
    font-weight: bold;
    cursor: pointer;
}

.submit-order {
    padding: 8px;
    background-color: #0a4396;
    color: white;
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 5px;
}

.indexes {
    color: #777;
    font-size: 12px;
}

.grid-icon-container {
    margin-left: -1px;
    height: 100%;
    display: flex;
    align-items: center;
    padding-right: 20px;
}

.grid-icon-container img {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.arrow-right {
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 10px solid #c50707;
    margin-right: -1px;
}

.arrow-right-cart {
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 10px solid #f9a93b;
    margin-right: -1px;
}

.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.session-timer {
    flex: 0 0 auto;
}

.session-message {
    color: #6c757d;
    font-size: 14px;
}

.category-summary {
    display: flex;
    gap: 20px;
    align-items: center;
}

.category-box {
    padding: 10px 15px;
    border-radius: 6px;
    min-width: 100px;
    text-align: center;
}

.category-name {
    font-weight: 500;
    margin-bottom: 4px;
    color: #fff;
}

.category-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.category-frozen {
    background-color: #0077b6;
}

.category-chilled {
    background-color: #48cae4;
}

.category-ambient {
    background-color: #fb8500;
}

.category-fresh {
    background-color: #2b9348;
}

.category-non-foods {
    background-color: #6c757d;
}

.footer-copyright {
    flex: 0 0 auto;
    color: #6c757d;
    font-size: 14px;
}

.amount {
    display: none !important;
}

div#productsTable_length label {
    display: flex;
    align-items: center;
}

div#productsTable_length select {
    width: 55px;
    height: 30px;
}

.list-selector-container-wrap.flex.gap-4.mb-4 {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.list-selector-container {
    display: flex;
    gap: 5px;
    align-items: center;
}

.list-selector-container .list-selector {
    width: 100%;
}

.list-selector-container-wrap button {
    min-width: 130px;
}

.filters.list-selector-grid {
    padding: 5px 10px;
}

/* Create List Popup Styles */
.create-list-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.create-list-popup.active {
    display: flex;
}

.popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.popup-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

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

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    padding: 8px 16px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

.btn-cancel:hover {
    color: #333;
}

.btn-confirm {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-confirm:hover {
    background-color: #45a049;
}

.btn-confirm:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}


img.grg_thumbnail {
    object-fit: contain;
    width: 30px;
    height: 35px;
}


.grg_cart_wrapper {
    width: 100%;
    margin: 0 auto;
}

.grg_cart_accordion {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.grg_cart_trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
    list-style: none;
}

.grg_cart_trigger:hover {
    background-color: #f8fafc;
}

.grg_cart_country {
    font-weight: 500;
    font-size: 16px;
}

.grg_cart_content {
    padding: 16px;
    border-top: 1px solid #e2e8f0;
}

.grg_cart_accordion>summary {
    list-style: none;
}

.grg_cart_accordion>summary::-webkit-details-marker {
    display: none;
}

.grg_cart_trigger::after {
    content: '▼';
    font-size: 12px;
    transition: transform 0.2s;
}

.grg_cart_accordion[open] .grg_cart_trigger::after {
    transform: rotate(180deg);
}

.grg_cart_category {
    margin-bottom: 24px;
}

.grg_cart_category:last-child {
    margin-bottom: 0;
}

.grg_cart_category_title {
    font-size: 18px;
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 16px;
}

.grg_cart_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.grg_cart_table th,
.grg_cart_table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.grg_cart_table th {
    background-color: #f8fafc;
    font-weight: 500;
    font-size: 14px;
    color: #4a5568;
}

.grg_cart_table td {
    font-size: 14px;
}

.grg_cart_table tbody tr:hover {
    background-color: #f8fafc;
}

.grg_cart_sku {
    font-family: monospace;
    color: #4a5568;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.quantity input {
    width: 60px;
    text-align: center;
    padding: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.quantity button {
    width: 25px;
    height: 25px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
}

.quantity button:hover {
    background: #e2e8f0;
}

.remove-item {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
}

.remove-item:hover {
    color: #c53030;
}

.update-cart {
    float: right;
    margin-top: 20px;
}

.coupon {
    float: left;
    margin-top: 20px;
}

.ag-header-cell-text {

    text-transform: uppercase;
}

button#startTour {
    background-color: #ff6b35;
    color: #fff;
}

button#startTour img {
    width: 20px;
}

.mobile_filters_wrap {
    display: none;
}



@media screen and (max-width: 768px) {
    .bottom-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        background-color: #f8f9fa;
        border-top: 1px solid #ddd;
        flex-direction: column;
        gap: 10px;
    }

    .actions-box {
        display: none !important;
    }

    .mobile_filters_wrap {
        display: flex;
        flex-direction: column;
    }

    .desktop-filters {
        display: none;
    }

    .search-container {
        gap: 10px;
        width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .filter_ic {
        padding: 0px 15px;
        background-color: #fff;
        border: 1px solid #ddd !important;
        border-radius: 6px;
        display: flex
;
        align-items: center;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100% !important;
    }

    button#startTour {
        background-color: #ff6b35;
        color: #fff;
        width: 100%;
        margin-bottom: 10px;
    }

    .filter-trigger {
        margin-top: 10px;
    }

    button#clearFilters {
        width: 100%;
    }

    .ag-paging-panel {
        height: 75px !important;
        flex-wrap: wrap-reverse;
        row-gap: 0px !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0;
    }

    span.ag-paging-page-summary-panel {
        margin-bottom: -15px;
    }

    /* .ag-paging-panel {
        display: flex
    ;
        flex-direction: column;
        height: 80px;
        justify-content: center;
        gap: 5px;
    } */

    .gt_float_switcher .gt-selected .gt-current-lang {
        padding: 5px 5px !important;
        color: #333;
        font-weight: bold;
    }

    .gt_float_switcher.notranslate {
        position: relative;
        top: 4px;
        right: -10px;
    }

    table.grg_order_review_table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

  

}
