/* POS Layout Wrapper */
.hms-pos-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
    height: calc(100vh - 200px);
    margin-top: 20px;
}

/* Menu Side */
.hms-pos-menu-side {
    overflow-y: auto;
    padding-right: 10px;
}

.hms-pos-search-bar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.hms-pos-search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

/* Food Grid */
.hms-food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.hms-food-card {
    background: #fff;
    border-radius: 15px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.hms-food-card:hover {
    transform: translateY(-5px);
    border-color: var(--hms-primary);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

.hms-food-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.hms-food-card h4 {
    margin: 5px 0;
    font-size: 14px;
    color: #1e293b;
}

.hms-food-price {
    font-weight: 700;
    color: var(--hms-primary);
}

/* Cart Side */
.hms-cart-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.hms-cart-header {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hms-cart-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.hms-cart-footer {
    padding: 20px;
    background: #f8fafc;
    border-radius: 0 0 20px 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 5px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 2px solid #e2e8f0;
}

/* Assignment Toggle */
.hms-assignment-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.hms-assignment-toggle button {
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: #64748b;
}

.hms-assignment-toggle button.active {
    background: #fff;
    color: var(--hms-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Premium Grid for Admin POS */
.hms-food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 10px;
}

.hms-food-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.hms-food-card:hover {
    transform: translateY(-8px);
    border-color: var(--hms-primary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.hms-food-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #f8fafc;
}

.hms-diet-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.tag-veg { background: #22c55e; }
.tag-nonveg { background: #ef4444; }

/* The Cart Card (Right Side) */
.hms-cart-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    position: sticky;
    top: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}



.hms-card-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.hms-food-card:hover .hms-card-actions {
    opacity: 1;
}

.hms-card-actions span {
    background: #fff;
    padding: 5px;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #64748b;
}

.hms-card-actions .delete-dish:hover { color: #ef4444; }
.hms-card-actions .edit-dish:hover { color: var(--hms-primary); }


.hms-m-tab {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.hms-m-tab.active {
    color: var(--hms-primary);
    border-bottom: 2px solid var(--hms-primary);
    background: #fff;
}
.hms-m-tab:hover:not(.active) {
    background: #f1f5f9;
    color: #1e293b;
}


/* Flexible Card for Expansion */
.hms-food-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    height: auto;
    max-height: 280px; /* Standard height */
}

.hms-food-card.expanded {
    max-height: 500px; /* Grow to show variants */
    border-color: var(--hms-primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.hms-variant-drawer {
    display: none;
    padding: 10px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: 10px;
}

.hms-food-card.expanded .hms-variant-drawer {
    display: block;
    animation: fadeIn 0.3s ease;
}

.variant-chip {
    display: block;
    padding: 8px;
    margin: 5px 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    transition: 0.2s;
}

.variant-chip:hover, .variant-chip.selected {
    background: var(--hms-primary);
    color: #fff;
    border-color: var(--hms-primary);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}


/* FORCE MODAL TO FRONT */
.hms-modal-overlay {
    position: fixed !important; /* Must be fixed to cover the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7) !important; /* Dark Slate transparent */
    backdrop-filter: blur(8px) !important; /* Premium Blur Effect */
    display: none; /* JS will change this to flex */
    align-items: center;
    justify-content: center;
    z-index: 999999 !important; /* Higher than WP admin bars */
}

/* Ensure the content is white and centered */
.hms-modal-overlay.active {
    display: flex !important;
}

#hms-dish-delete-modal .hms-modal-content {
    background: #ffffff !important;
    border-radius: 24px !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    max-width: 400px;
    width: 90%;
    padding: 30px;
    position: relative;
    transform: scale(1);
    transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}


.hms-food-card.is-disabled {
    opacity: 0.6;
    filter: grayscale(0.8);
    pointer-events: none; /* Can't add to cart */
    position: relative;
}

.hms-sold-out-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: #ef4444;
    color: white;
    padding: 5px 15px;
    font-weight: 900;
    font-size: 14px;
    border-radius: 6px;
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}



.hms-manage-table {
    width: 100%;
    border-collapse: collapse;
}
.hms-manage-table th {
    background: #f1f5f9;
    padding: 12px 20px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    position: sticky;
    top: 0;
    z-index: 5;
}
.hms-manage-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}
.hms-table-input {
    width: 70px;
    padding: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-align: center;
}
.hms-badge-blue { background: #dbeafe; color: #1e40af; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.hms-badge-purple { background: #f3e8ff; color: #6b21a8; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.hms-badge-gray { background: #f1f5f9; color: #475569; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; }





.hms-na-text {
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.inline-time-update {
    background: #fdfdfd;
    cursor: pointer;
    font-size: 11px;
    width: 90px !important; /* Slightly wider for time picker */
}


/* Premium Search Wrapper */
.hms-manage-filter-area {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.hms-search-container {
    position: relative;
    flex: 1;
}

.hms-search-container .dashicons-search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.hms-premium-input {
    width: 100%;
    padding: 10px 15px 10px 40px ! aspiration;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.hms-premium-input:focus {
    background: #fff;
    border-color: var(--hms-primary);
    box-shadow: 0 0 0 4px rgba(var(--hms-primary-rgb), 0.1);
    outline: none;
}

/* Premium Table Row Hover */
.hms-manage-table tr {
    transition: background 0.2s ease;
}

.hms-manage-table tr:hover {
    background: #f8fafc;
}

/* Badge Refinements */
.hms-badge-blue { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.hms-badge-gray { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }






.category-chip {
    padding: 8px 20px;
    background: #f1f5f9;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.category-chip.active {
    background: var(--hms-primary);
    color: #fff;
}

.category-chip:hover:not(.active) {
    background: #e2e8f0;
    color: var(--hms-black);
}


/* Premium Toggle Switch */
.hms-master-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}
.hms-master-toggle input { opacity: 0; width: 0; height: 0; }

.hms-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e2e8f0;
    transition: .3s;
    border-radius: 20px;
}
.hms-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px; width: 14px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .hms-toggle-slider { background-color: #22c55e; }
input:checked + .hms-toggle-slider:before { transform: translateX(18px); }

/* Card Ghost State */
.hms-card-hidden {
    opacity: 0.4 !important;
    filter: grayscale(1) !important;
    pointer-events: none; /* Prevents adding hidden items to cart */
}



/* Custom Ghost Toggle */
.hms-visibility-trigger {
    width: 42px;
    height: 20px;
    background: #cbd5e1;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    display: inline-block;
    transition: background 0.3s ease;
}

.hms-visibility-trigger.is-active {
    background: #22c55e; /* Green when active */
}

.hms-toggle-knob {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hms-visibility-trigger.is-active .hms-toggle-knob {
    transform: translateX(22px);
}

/* Ensure background cards react */
.hms-card-hidden {
    opacity: 0.4 !important;
    filter: grayscale(1) !important;
    pointer-events: none !important;
}




/* Style for the Payment Choice Buttons */
.hms-pay-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hms-pay-btn.active {
    background: var(--hms-primary) !important;
    color: white !important;
    border-color: var(--hms-primary) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hms-pay-btn:hover:not(.active) {
    background: #f8fafc;
    border-color: #cbd5e1;
}




/* Add this to your main CSS */
/*#hms-header-badge, #hms-header-title, #hms-header-desc {*/
/*    transition: all 0.3s ease-in-out;*/
/*}*/