﻿/* ============================================================
   POS PAGE - FULL SCREEN
   ============================================================ */



.pos-page {
    height: calc(100vh-50px);
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #eaf4ff;
    overflow: hidden;
}


/* ============================================================
   HEADER
   ============================================================ */

.pos-header {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    padding: 3px 10px;
    margin-bottom: 4px;
    background: white;
    box-sizing: border-box;
}

.header-left,
.header-center,
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-left {
    width: 30%;
}

.header-center {
    width: 35%;
    justify-content: center;
}

.header-right {
    width: 35%;
    justify-content: flex-end;
    gap: 14px;
}

.location-text {
    font-weight: 700;
}


/* ============================================================
   TABLE PANEL
   ============================================================ */

.table-panel {
    flex: 0 0 58px;
    background: white;
    padding: 3px 8px;
    margin-bottom: 4px;
    box-sizing: border-box;
    overflow: hidden;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 16px;
    font-weight: 600;
}

.table-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    box-sizing: border-box;
}


/* ============================================================
   TABLE BUTTON
   ============================================================ */

.table-button {
    min-width: 64px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    border-radius: 12px !important;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #3b82f6, #8b5cf6) border-box !important;
    border: 2px solid transparent !important;
    font-weight: bold !important;
    color: #374151 !important;
    font-size: 13px !important;
    text-align: center;
    cursor: pointer;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
    flex: 0 0 auto;
}


    /* TABLE HOVER */

    .table-button:hover {
        background: linear-gradient(#EAF4FF, #EAF4FF) padding-box, linear-gradient( 135deg, #3b82f6, #8b5cf6, #10b981 ) border-box !important;
        color: #111827 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-1px);
    }


/* TABLE SELECTED */

.table-selected {
    background: linear-gradient(#10b981, #10b981) padding-box, linear-gradient( 135deg, #059669, #34d399 ) border-box !important;
    color: #ffffff !important;
    font-weight: bold !important;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.25);
}


/* ============================================================
   CONTROL BAR
   ============================================================ */

.control-bar {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 4px 10px;
    margin-bottom: 4px;
    background: white;
    box-sizing: border-box;
}

.control-label {
    font-weight: 600;
}

.control-spacer {
    flex: 1;
}

.room-select {
    width: 450px;
}

.pax-field {
    width: 50px;
}


/* ============================================================
   MAIN POS AREA
   ============================================================ */



.pos-main {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 18% 28% 44% 10%;
    gap: 4px;
    overflow: hidden;
}


/* ============================================================
   COMMON PANELS
   ============================================================ */

.items-panel,
.order-panel,
.actions-panel {
    min-width: 0;
    min-height: 0;
    background: white;
    overflow: hidden;
}




/* ============================================================
   PANEL HEADER
   ============================================================ */

.panel-header {
    flex: 0 0 auto;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 8px;
    box-sizing: border-box;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.panel-header-spacer {
    flex: 1;
}


/* ============================================================
   CATEGORY PANEL
   ============================================================ */


.categories-panel {
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

.category-scroll {
    flex: 1 1 0;
    min-height: 0;
    height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 5px;
    padding: 6px;
    box-sizing: border-box;
}
/* CATEGORY BUTTON */

.category-button {
    min-height: 48px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    border-radius: 7px !important;
    transition: all 0.2s ease;
}


    /* CATEGORY HOVER */

    .category-button:hover {
        background: #dbeafe !important;
        color: #111827 !important;
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    }


/* CATEGORY SELECTED */

.category-selected {
    background: #2563eb !important;
    color: white !important;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25);
}


    /* Keep selected hover blue */

    .category-selected:hover {
        background: #1d4ed8 !important;
        color: white !important;
    }


/* ============================================================
   ITEM PANEL
   ============================================================ */

.item-scroll {
    height: calc(100% - 42px);
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
    gap: 5px;
    padding: 6px;
    box-sizing: border-box;
}

.item-search {
    width: 170px;
}


/* ============================================================
   ITEM BUTTON
   ============================================================ */

.item-button {
    min-height: 58px !important;
    padding: 4px !important;
    background: #f1f5f9 !important;
    color: #1f2937 !important;
    border-radius: 8px !important;
    text-transform: none !important;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.03);
}


    /* ITEM HOVER */

    .item-button:hover {
        background: #dbeafe !important;
        color: #111827 !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
        transform: translateY(-1px);
    }


/* ITEM CONTENT */

.item-button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 100%;
}


/* ============================================================
   ORDER PANEL
   ============================================================ */




    /* ORDER HEADER */

  




.order-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

    .order-panel .panel-header {
        flex: 0 0 42px;
    }

.order-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}


/* ============================================================
   ORDER TABLE
   ============================================================ */

.pos-order-table {
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .pos-order-table .mud-table-container {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto !important;
        overflow-x: hidden;
    }


/* ORDER ITEM */

.order-item-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* ============================================================
   QUANTITY CONTROL
   ============================================================ */

.qty-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

    .qty-control span {
        min-width: 22px;
        text-align: center;
        font-weight: 600;
    }


/* ============================================================
   TOTAL AREA
   ============================================================ */

.order-total-area {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    line-height: 20px;
}

.discount-row {
    color: #dc2626;
}

.grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 19px;
    font-weight: 800;
    color: #111827;
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.amount-cell {
    font-weight: 600;
}


/* ============================================================
   ACTION PANEL
   ============================================================ */

.actions-panel {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    overflow-y: auto;
}


/* ============================================================
   ACTION BUTTONS
   ============================================================ */

.pos-action {
    width: 100%;
    min-height: 46px !important;
    flex: 0 0 auto;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}


    /* ACTION HOVER */

    .pos-action:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    }


/* KOT */

.kot {
    background: #2563eb !important;
    color: white !important;
}

    .kot:hover {
        background: #1d4ed8 !important;
        color: white !important;
    }


/* BILL */

.bill {
    background: #059669 !important;
    color: white !important;
}

    .bill:hover {
        background: #047857 !important;
        color: white !important;
    }


/* CLEAR */

.clear {
    background: #f59e0b !important;
    color: white !important;
}

    .clear:hover {
        background: #d97706 !important;
        color: white !important;
    }


/* CANCEL */

.cancel {
    background: #dc2626 !important;
    color: white !important;
}

    .cancel:hover {
        background: #b91c1c !important;
        color: white !important;
    }


/* ============================================================
   STATUS MESSAGE
   ============================================================ */

.pos-message {
    flex: 0 0 auto;
    margin-top: 4px;
}


/* ============================================================
   BILL DIALOG
   ============================================================ */

.bill-info {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.bill-table {
    margin-top: 8px;
}

.bill-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    background: #f1f5f9;
    font-size: 20px;
    font-weight: 800;
}


/* ============================================================
   ROOM DIALOG
   ============================================================ */

.room-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 10px;
    max-height: 55vh;
    overflow-y: auto;
}


.room-button {
    height: 48px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #374151 !important;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient( 135deg, #3b82f6, #8b5cf6 ) border-box !important;
    border: 2px solid transparent !important;
    transition: all 0.2s ease;
}


    /* ROOM HOVER */

    .room-button:hover {
        background: linear-gradient(#EAF4FF, #EAF4FF) padding-box, linear-gradient( 135deg, #3b82f6, #8b5cf6, #10b981 ) border-box !important;
        color: #111827 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-1px);
    }


/* ROOM SELECTED */

.room-selected {
    color: white !important;
    background: linear-gradient(#10b981, #10b981) padding-box, linear-gradient( 135deg, #059669, #34d399 ) border-box !important;
}


/* ============================================================
   OUTLET
   ============================================================ */

.outlet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
}

.outlet-button {
    min-height: 65px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}

    .outlet-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }


/* ============================================================
   SCROLLBARS
   ============================================================ */

.pos-page ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.pos-page ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.pos-page ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

    .pos-page ::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1400px) {

    .pos-main {
        grid-template-columns: 18% 28% 44% 10%;
    }

    .item-scroll {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 1200px) {

    .pos-main {
        grid-template-columns: 20% 30% 40% 10%;
    }
}


@media (max-width: 900px) {

    .pos-main {
        grid-template-columns: 30% 70%;
    }

    .order-panel,
    .actions-panel {
        display: none;
    }

    .header-left {
        width: 40%;
    }

    .header-center {
        width: 30%;
    }

    .header-right {
        width: 30%;
    }
}
