/* Base Layout Styles */
.page.main-outer-page {
    display: flex;
    height: 100vh;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.sidebar {
    width: 280px;
    height: 100vh;
    background: white;
    transition: transform 0.3s ease;
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    will-change: transform;
}

main {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    max-width: calc(100% - 280px);
    background: #f8f9fa;
    overflow: hidden !important;
}

.content {
    padding: 1rem;
    margin: 0 auto;
    width: 100%;
}

/* Adjust Header Section: Ensure button is on the same line as title */
.sync-header {
    display: flex;
    align-items: center; /* Align title and button horizontally */
    justify-content: space-between; /* Space them out */
}

.sync-title {
    margin: 0;
}

.sync-button {
    margin-left: 10px;
    display: inline-block;
}

/* Hamburger Button Base Styles */
.hamburger-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1.5rem;
    padding: 5px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

    .hamburger-btn:hover {
        background: #f8f9fa;
    }

/* For Mobile and Tablet View */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .main-container-layout {
        margin-left: 0;
        max-width: 100%;
    }

    .mobile-nav-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 995;
        border-bottom: 1px solid #dddddd;
        width: 100%;
        padding-bottom: 4px;
    }

    .content {
        padding: 1rem 0;
        padding-top: 4rem;
    }
    /* Adjust header layout for smaller devices */
    .sync-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sync-button {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* For Mobile Phone (iPhone) specific styles */
@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    main {
        margin-left: 0;
        max-width: 100%;
        padding: 0;
    }

    .mobile-nav-toggle {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 980;
        border-bottom: 1px solid #dddddd;
        width: 100%;
        padding: 10px 20px;
        background: #f8f9fa;
    }

    .content {
        padding: 1rem 0;
        padding-top: 4rem;
    }
}

/* Table and Payment Styles */
.table-menu-payment {
    position: relative;
    padding: 5px 10px;
    border-radius: 20px;
    z-index: 9;
    background: #fff;
    border: 1px solid #dddddd;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
}

.table-number {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.table-menu-payment .table-number {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    gap: 5px;
    align-items: center;
}

/* Button Styles */
.home-btn {
    width: 40px;
    height: 40px;
    padding: 0;
}

    .home-btn:hover svg {
        fill: #ffffff;
    }

.pay-items-button {
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

    .pay-items-button:hover {
        background: #f8f9fa;
    }

/* User Section Styles */
.user-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 180px;
    margin: 0px auto 20px;
}

    .user-section .form-select {
        width: 100%;
        border: 1px solid #dddddd;
        padding: 9px 12px;
        border-radius: 3px;
    }

    .user-section label {
        text-align: center;
        margin-bottom: 5px;
    }

/* Utility Classes */
.p30 {
    padding: 30px;
}

.p15 {
    padding: 15px;
}

.off-line {
    width: auto;
    margin: 0 auto;
    display: flex;
}

/* Button Variants */
.btn-outline-full {
    background: #246bfd;
    color: #ffffff;
}

    .btn-outline-full:hover {
        opacity: 0.9;
    }

/* Track Order Styles */
.track-order {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

/* Payment Button Styles */
.proceed-payment {
    background: #246bfd;
    color: #fff;
    border: 2px solid #246bfd;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    display: block;
    outline: none;
    transition: 0.3s ease-in-out;
    cursor: pointer;
    min-width: 150px;
}

/* Additional Media Query */
@media (max-width: 1024px) {
    .table-menu-payment {
        margin-top: 4rem;
    }
}

/* Misc Styles */
.img-small {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.app-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* Desktop/Web Override: Always show the sidebar and nav menu on screens 1024px and wider */
@media (min-width: 1026px) {
    .sidebar {
        /* Force the sidebar to be visible even if isNavOpen is false */
        display: block !important;
        transform: none !important;
    }
    /* If your navigation inside the sidebar uses the .nav-menu class, force it visible */
    .nav-menu {
        display: block !important;
        position: relative; /* Use relative or static depending on your layout needs */
        transform: none !important;
        transition: none;
        width: 280px;
    }
}
