﻿/* ============================================ */
/* FlexibleX List & Search Box Styles          */
/* Special styles for #search-work-space        */
/* ============================================ */

.download-table tr td{
    padding:5px;
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    background-color:whitesmoke;
}

/* -------------------- */
/* SEARCH WORK SPACE - RESPONSIVE CENTERED OVERLAY */
/* -------------------- */
#search-work-space a{
    color:blue;
    padding:0px;
    margin:0px;
}

#search-work-space{
    position: fixed !important;
    z-index: 9999 !important;
    display: none; /* Hidden by default */
    
    /* Full screen coverage */
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    
    /* Center content - flex layout when shown */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    
    /* Professional dark overlay */
    background-color: rgba(0, 0, 0, 0.6);
    
    /* Lock position - prevent any movement */
    pointer-events: auto;
}

/* Mobile: Reduce overlay padding for maximum usable space */
@media (max-width: 767px) {
    #search-work-space {
        padding: 4px;
    }
}

/* When shown by jQuery, ensure it uses flex layout */
#search-work-space[style*="display: block"],
#search-work-space[style*="display:block"] {
    display: flex !important;
}

/* Inner content container - centered white box with professional styling */
.search-content-wrapper {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border-radius: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: none;
    width: 95%;
    max-width: 1400px;
    max-height: 95vh;
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Mobile: Reduce wrapper padding for more space */
@media (max-width: 767px) {
    .search-content-wrapper {
        padding: 8px;
        width: 98%;
    }
}

/* Search box section */
.search-content-wrapper > .search-box {
    margin: -24px -24px 16px -24px;
    border-radius: 12px 12px 0 0;
    background: white;
    padding: 12px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Mobile: Reduce padding for more space */
@media (max-width: 767px) {
    .search-content-wrapper > .search-box {
        padding: 6px 8px;
        margin: -8px -8px 8px -8px;
    }
}

/* Search body - grid container (width controlled by parent) */
#search-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.search-top {
    margin-bottom: 16px;
}

#check-out-li{
    float:right;
}

/* Responsive cash input - Enhanced contrast */
#qpa-cash-paid {
    height: 44px;
    width: 100%;
    max-width: 200px;
    padding: 8px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #4a5568;
    border-radius: 6px;
    box-sizing: border-box;
    background: linear-gradient(to bottom, #ffffff 0%, #f7fafc 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

#qpa-cash-paid:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
    background: white;
}

#qpa-search-body{
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    font-size: 15px;
    line-height: 1.6;
    min-height: 400px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Mobile: Reduce padding for more usable space */
@media (max-width: 767px) {
    #qpa-search-body {
        padding: 8px;
        border-radius: 4px;
    }
}

/* POS Display - Clear transaction view */
#qpa-data-table-div {
    background: #0f172a !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-height: 200px;
    max-height: 500px;
    border: 2px solid #1e293b;
    border-radius: 8px;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    font-size: 16px;
    line-height: 1.6;
    display: block !important;
}

/* Mobile: Reduce padding for more visible rows */
@media (max-width: 767px) {
    #qpa-data-table-div {
        padding: 8px;
        border-radius: 4px;
    }
}

/* Ensure tables inside qpa-data-table-div are visible */
#qpa-data-table-div .items-table,
#qpa-data-table-div .table-responsive {
    display: table !important;
    width: 100% !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
    background: #0f172a !important;
}

#qpa-data-table-div table {
    display: table !important;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    font-size: 16px;
    background: #0f172a !important;
}

#qpa-data-table-div table thead,
#qpa-data-table-div table tbody {
    display: table-row-group !important;
    background: #0f172a !important;
}

#qpa-data-table-div table thead th {
    background: #0f172a !important;
    color: #ffffff !important;
    font-weight: 700;
    padding: 10px 8px;
    text-align: left;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #ffffff;
}

#qpa-data-table-div table tbody tr {
    display: table-row !important;
    border-bottom: 1px solid #1e293b;
    background: #0f172a !important;
}

#qpa-data-table-div table tbody tr:hover {
    background-color: #1e293b !important;
}

#qpa-data-table-div table tbody td {
    display: table-cell !important;
    padding: 10px 8px;
    color: #ffffff !important;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 200px;
    background: #0f172a !important;
}

#qpa-data-table-div table tbody td button {
    padding: 5px 14px;
    font-size: 13px;
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 700;
}

#qpa-data-table-div table tbody td button:hover {
    background: #cccccc;
    color: #000000;
    border-color: #cccccc;
}

/* Responsive table - horizontal scroll on small screens */
@media (max-width: 1023px) {
    #qpa-data-table-div {
        min-height: 300px !important;
        max-height: 70vh !important;
    }
    
    #qpa-data-table-div .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #qpa-data-table-div table {
        font-size: 12px;
    }
    
    #qpa-data-table-div table th,
    #qpa-data-table-div table td {
        padding: 6px 4px;
        white-space: normal;
    }
    
    #qpa-data-table-div table tbody td {
        max-width: 150px;
    }
}

@media (max-width: 640px) {
    #qpa-data-table-div {
        min-height: 400px !important;
        max-height: 80vh !important;
    }
    
    #qpa-data-table-div table {
        font-size: 14px;
    }
    
    #qpa-data-table-div table th,
    #qpa-data-table-div table td {
        padding: 8px 6px;
    }
}

#qpa-data-table-div tr {
    display: table-row !important;
}

#qpa-data-table-div td,
#qpa-data-table-div th {
    display: table-cell !important;
}

/* Mobile: Compact display with scrolling */
@media (max-width: 1023px) {
    .qpa-items-table-container {
        max-height: 300px;
        min-height: 200px;
    }
    
    #qpa-data-table-div {
        max-height: 300px;
        min-height: 150px;
    }
}

/* Desktop: Taller display */
@media (min-width: 1024px) {
    #qpa-data-table-div {
        max-height: 500px;
        min-height: 200px;
    }
    
    #qpa-search-body {
        min-height: 200px;
        max-height: 500px;
    }
    
    .qpa-items-table-container {
        max-height: 500px;
        min-height: 200px;
    }
}

/* ==========================================
   QPA COLUMN 3: PAYMENT SECTION
   ========================================== */

.qpa-payment-section {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Mobile: Reduce padding for more usable space */
@media (max-width: 767px) {
    .qpa-payment-section {
        padding: 8px;
        border-radius: 4px;
    }
}

.qpa-amounts-div,
.qpa-printing-div {
    width: 100%;
    margin-bottom: 16px;
}

.Flexiblex-search-table {
    border-color: #e0e0e0;
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.Flexiblex-search-table tr{
    border-bottom: 1px solid #e8eaed;
}

.Flexiblex-search-table tr:hover{
    background-color: #f8f9fa;
    cursor: pointer;
}

.Flexiblex-search-table tr:active {
    background-color: #e8eaed;
}

.Flexiblex-search-table tr th{
   background: linear-gradient(to bottom, #667eea 0%, #5a67d8 100%);
   color: #ffffff;
   font-weight: 600;
   padding: 14px 12px;
   text-align: left;
   border: none;
   font-size: 13px;
   text-transform: uppercase;
   letter-spacing: 0.8px;
}

.Flexiblex-search-table tr td{
  padding: 12px;
  color: #2d3748;
  line-height: 1.5;
}

.Flexiblex-search-table tr .item-data{
   padding: 12px;
   white-space: nowrap;
   font-weight: 600;
   color: #1a202c;
}

.Flexiblex-search-table tr .description-data{
    max-width: 500px;
    overflow: auto;
    padding: 12px;
    color: #4a5568;
}

.Flexiblex-search-table tr .other-data {
    padding: 12px;
    white-space: nowrap;
    color: #718096;
    font-size: 13px;
}

/* Mobile: Reduce table padding for more compact display */
@media (max-width: 767px) {
    .Flexiblex-search-table tr th {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .Flexiblex-search-table tr td,
    .Flexiblex-search-table tr .item-data,
    .Flexiblex-search-table tr .description-data,
    .Flexiblex-search-table tr .other-data {
        padding: 6px;
    }
}

/* Mobile responsive styles for search table */
@media (max-width: 640px) {
    .Flexiblex-search-table {
        font-size: 13px;
    }
    
    .Flexiblex-search-table thead {
        display: none;
    }
    
    .Flexiblex-search-table tr {
        display: block;
        margin-bottom: 6px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        padding: 6px;
        background: white;
    }
    
    .Flexiblex-search-table tr:hover {
        background-color: #f8f9fa;
        border-color: #2563eb;
    }
    
    .Flexiblex-search-table td {
        display: block;
        padding: 4px 0 !important;
        border: none;
        text-align: left;
    }
    
    .Flexiblex-search-table tr .item-data {
        font-size: 15px;
        font-weight: 700;
        color: #1e40af;
        padding: 4px 0;
        margin-bottom: 4px;
    }
    
    .Flexiblex-search-table tr .description-data {
        font-size: 14px;
        font-weight: 600;
        color: #111827;
        max-width: 100%;
        white-space: normal;
        padding: 4px 0;
        margin-bottom: 4px;
    }
    
    .Flexiblex-search-table tr .other-data {
        font-size: 12px;
        color: #6b7280;
        padding: 4px 0;
        white-space: normal;
    }
}

/* ==========================================
   QPA 3-COLUMN LAYOUT
   ========================================== */

/* QPA Container: 3-column grid on desktop, stack on mobile */
#search-body {
    display: grid;
    gap: 20px;
}

/* Mobile: Vertical stack */
@media (max-width: 1023px) {
    #search-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    /* Order: Items table -> POS display -> Payment */
    .qpa-items-table-container {
        order: 1;
    }
    
    #qpa-data-table-div {
        order: 2;
    }
    
    .qpa-payment-section {
        order: 3;
    }
}

/* Desktop: 3-column layout */
@media (min-width: 1024px) {
    #search-body {
        grid-template-columns: 2fr 2fr 1.5fr;
        grid-template-rows: auto;
        align-items: stretch;
    }
    
    /* DEBUG: Temporary borders to see columns */
    .qpa-items-table-container,
    #qpa-search-body {
        border: 2px solid red !important;
    }
    
    #qpa-data-table-div {
        border: 2px solid blue !important;
    }
    
    .qpa-payment-section {
        border: 2px solid green !important;
    }
}

/* ==========================================
   QPA COLUMN 1: ITEMS CARDS (Card-based Layout)
   ========================================== */

.qpa-items-table-container {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.qpa-items-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

.qpa-item-card {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 6px 8px;
    margin-bottom: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.qpa-item-card:hover {
    background: #f8fafc;
    border-color: #2563eb;
}

.qpa-card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
    align-items: center;
}

.qpa-card-item {
    font-weight: 700;
    font-size: 14px;
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    background: #eff6ff;
    color: #1e40af;
    width: 120px;
    flex-shrink: 0;
}

.qpa-card-description {
    font-size: 16px;
    font-weight: 700;
    padding: 4px 6px;
    border: none;
    background: transparent;
    color: #111827;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qpa-card-inputs {
    display: flex;
    gap: 6px;
    align-items: center;
}

.qpa-card-field {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qpa-card-field:first-of-type {
    width: auto;
}

.qpa-card-field:nth-of-type(2) {
    width: auto;
}

.qpa-card-field label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: 50px;
    flex-shrink: 0;
}

.qpa-card-quantity,
.qpa-card-amount {
    width: 95px;
    padding: 5px 6px;
    border: 1px solid #cbd5e0;
    border-radius: 3px;
    background: white;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
    box-sizing: border-box;
}

.qpa-card-quantity:focus,
.qpa-card-amount:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.qpa-card-action {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.qpa-card-select-btn {
    padding: 5px 20px;
    font-size: 13px;
    font-weight: 700;
    min-width: 75px;
    white-space: nowrap;
    background: #2563eb !important;
    border-color: #2563eb !important;
}

.qpa-card-select-btn:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

/* POS Optimization: Compact view for more items */
.qpa-items-cards-container,
.qpa-items-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Touch-friendly targets for touchscreen POS */
@media (max-width: 640px) {
    #qpa-search-body {
        min-height: 50vh;
    }
    
    .qpa-item-card {
        padding: 4px 6px;
        margin-bottom: 2px;
    }
    
    .qpa-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        margin-bottom: 4px;
    }
    
    .qpa-card-item {
        font-size: 13px;
        padding: 3px 6px;
        width: 100%;
        max-width: none;
    }
    
    .qpa-card-description {
        font-size: 15px;
        font-weight: 700;
        width: 100%;
        white-space: normal;
        padding: 3px 0;
        line-height: 1.2;
    }
    
    .qpa-card-inputs {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
    }
    
    .qpa-card-field {
        display: flex;
        align-items: center;
        gap: 3px;
    }
    
    .qpa-card-field:first-of-type {
        flex: 0 0 auto;
    }
    
    .qpa-card-field:nth-of-type(2) {
        flex: 1;
    }
    
    .qpa-card-field label {
        font-size: 12px;
        font-weight: 700;
        width: auto;
        min-width: 30px;
    }
    
    .qpa-card-quantity {
        width: 60px;
        padding: 6px 4px;
        font-size: 16px;
    }
    
    .qpa-card-amount {
        flex: 1;
        min-width: 90px;
        padding: 6px;
        font-size: 16px;
    }
    
    .qpa-card-action {
        flex: 0 0 auto;
        margin-left: 0;
    }
    
    .qpa-card-select-btn {
        width: auto;
        min-width: 45px;
        padding: 6px 12px;
        font-size: 16px;
    }
}

/* Old table styles - keeping for backward compatibility */
.qpa-items-table {
    width: 100%;
    border-collapse: collapse;
}

.qpa-items-table th {
    background: linear-gradient(to bottom, #667eea 0%, #5a67d8 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 8px 6px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.qpa-items-table td {
    padding: 6px;
    background-color: #fef3c7;
    border-bottom: 1px solid #e0e0e0;
}

.qpa-items-table input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    background-color: white;
    min-height: 32px;
}

.qpa-items-table input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* Column widths */
.qpa-items-table .qpaitem-data input {
    max-width: 80px;
}

.qpa-items-table .qpadescription-data input {
    min-width: 120px;
}

.qpa-items-table .qpaquantity-input input,
.qpa-items-table .qpaamount-input input {
    max-width: 70px;
    text-align: right;
}

/* Mobile: Larger inputs */
@media (max-width: 640px) {
    .qpa-items-table th,
    .qpa-items-table td {
        padding: 8px 4px;
    }
    
    .qpa-items-table input[type="text"] {
        min-height: 40px;
        font-size: 14px;
    }
}

/* ==========================================
   QPA COLUMN 2: POS DISPLAY (Transaction View)
   ========================================== */

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

/* Mobile: Reduce search box padding */
@media (max-width: 767px) {
    .search-box {
        gap: 8px;
        padding: 8px;
        margin-bottom: 8px;
        border-radius: 4px;
    }
}

.search-box input {
    flex: 1;
    min-width: 200px;
    height: 44px;
    font-size: 16px; /* Prevents iOS zoom */
    padding: 10px 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background-color: #ffffff;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    color: #2d3748;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-box input:focus {
    outline: none;
    border-color: #ffffff;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-box .fa {
    cursor: pointer;
    min-width: 50px;
    width: 50px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    flex-shrink: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.search-box .fa::before {
    content: "→";
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-style: normal;
}

.search-box .fa:hover {
    background: linear-gradient(135deg, #7788ff 0%, #8a5cba 100%);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Desktop: Show "Search" text */
@media (min-width: 768px) {
    .search-box .fa {
        min-width: 70px;
        width: auto;
        padding: 0 16px;
        font-size: 15px;
    }
    
    .search-box .fa::before {
        content: "Search";
    }
}

/* Specific button styling using IDs and specific nesting - DO NOT override global bootstrap */
#qpa-check-out,
#qpa-confirm-change,
#search-work-space .qpa-amounts-div input[type="submit"],
#search-work-space .qpa-printing-div input[type="submit"],
#search-work-space form input[value="RECEIPT"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    border: none !important;
    padding: 10px 20px !important;
    min-height: 40px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
    font-size: 14px !important;
    letter-spacing: 0.3px;
    line-height: 1.5 !important;
    text-align: center;
    display: inline-block !important;
}

#qpa-check-out:hover,
#qpa-confirm-change:hover,
#search-work-space .qpa-amounts-div input[type="submit"]:hover,
#search-work-space .qpa-printing-div input[type="submit"]:hover,
#search-work-space form input[value="RECEIPT"]:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
    background: linear-gradient(135deg, #7788ff 0%, #8a5cba 100%) !important;
}

/* Close button gets professional dark styling - specific selector */
#search-work-space .search-box .search-close-button {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    border: none !important;
    padding: 10px 24px !important;
    height: 44px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    font-size: 15px !important;
    letter-spacing: 0.3px;
    line-height: 1.5 !important;
    display: inline-block !important;
    flex-shrink: 0;
}

#search-work-space .search-box .search-close-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    background: linear-gradient(135deg, #5a6678 0%, #3d4858 100%) !important;
}

/* Scoped .btn-secondary and .btn-primary styling for buttons within search workspace */
#search-work-space .btn-secondary,
#search-work-space .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    border: none !important;
    padding: 10px 20px !important;
    min-height: 40px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
    font-size: 14px !important;
    letter-spacing: 0.3px;
    line-height: 1.5 !important;
    text-align: center;
    display: inline-block !important;
}

#search-work-space .btn-secondary:hover,
#search-work-space .btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
    background: linear-gradient(135deg, #7788ff 0%, #8a5cba 100%) !important;
}

/* ==========================================
   QPA PAYMENT SECTION - RESPONSIVE
   ========================================== */

/* AMOUNTS DIV & PRINTING DIV: Table-based layout */
.qpa-amounts-div,
.qpa-printing-div {
    width: 100%;
    margin-bottom: 16px;
}

.qpa-amounts-div table,
.qpa-printing-div table {
    width: 100%;
    border-collapse: collapse;
}

.qpa-amounts-div table td,
.qpa-printing-div table td {
    vertical-align: middle;
}

/* Ensure buttons fill their cells */
.qpa-amounts-div table button,
.qpa-amounts-div table div[id^="qpa-"],
.qpa-printing-div table button,
.qpa-printing-div table div[id^="qpa-"],
.qpa-printing-div table form {
    width: 100%;
    margin: 0;
}

.qpa-printing-div table form button {
    width: 100%;
}

#qpa-total-amount {
    width: 100% !important;
    text-align: right !important;
    padding: 16px !important;
    font-size: 32px !important;
    font-weight: 900 !important;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    border: 3px solid #3b82f6 !important;
    font-family: 'Courier New', 'Consolas', monospace !important;
    letter-spacing: 2px !important;
    line-height: 1.3 !important;
    min-height: 60px !important;
    display: block !important;
    box-sizing: border-box !important;
    margin-bottom: 10px !important;
}

/* Mobile: Slightly smaller but still prominent */
@media (max-width: 767px) {
    #qpa-total-amount {
        font-size: 24px !important;
        padding: 12px !important;
        min-height: 52px !important;
        letter-spacing: 1px !important;
    }
}

#qpa-cash-paid {
    width: 100% !important;
    min-height: 52px !important;
    padding: 12px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    text-align: right !important;
    border: 3px solid #4a5568 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    color: #1a202c !important;
    font-family: 'Courier New', 'Consolas', monospace !important;
    letter-spacing: 1px !important;
}

/* Mobile: Ensure input remains usable */
@media (max-width: 767px) {
    #qpa-cash-paid {
        font-size: 20px !important;
        padding: 10px !important;
        min-height: 48px !important;
    }
}

#change-amount {
    width: 100% !important;
    text-align: center !important;
    font-size: 32px !important;
    font-weight: 900 !important;
    padding: 16px !important;
    background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    border: 3px solid #10b981 !important;
    letter-spacing: 2px !important;
    min-height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Courier New', 'Consolas', monospace !important;
}

/* Mobile: Compact but visible change display */
@media (max-width: 767px) {
    #change-amount {
        font-size: 24px !important;
        padding: 12px !important;
        min-height: 52px !important;
        letter-spacing: 1px !important;
    }
}

#qpa-check-out {
    width: 100%;
    min-height: 56px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5) !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

#qpa-check-out:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6) !important;
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
}

/* Mobile: Ensure checkout button remains touch-friendly */
@media (max-width: 767px) {
    #qpa-check-out {
        min-height: 48px !important;
        font-size: 16px !important;
        padding: 12px 16px !important;
    }
}

#qpa-confirm-change {
    width: 100%;
    min-height: 48px;
    font-size: 15px !important;
    padding: 12px 16px !important;
}

.Flexiblex-search-table tr .other-data {
    padding: 5px;
    text-wrap: none;
}

/*does not need to be displayed*/
.search-top{
    background-color:lightslategrey;
    height:00px;
    font-size:small;
    vertical-align:bottom;
    font-weight:bold;
    color:gray;
    text-align:center;
    padding:2px;
    width:100%;
    text-transform:capitalize;
    visibility:hidden      
}

.qpa-items-table tr td{    
background-color:#ffd800;   

}
.qpa-items-table tr td input{
    padding-left:3px;
    height:30px;
    font-size:15px;
    margin:0px;
    
}

.qpa-amounts-div,
.qpa-printing-div{
    width:100%;
    padding:10px;
}

/* Mobile: Reduce padding for more compact layout */
@media (max-width: 767px) {
    .qpa-amounts-div,
    .qpa-printing-div {
        padding: 4px;
    }
}

.qpa-amounts-div ul,
.qpa-printing-div ul{
    list-style:none;
    list-style-type:none;
}

.qpa-amounts-div ul li,
.qpa-printing-div ul li{
   display:inline-block;
   padding-top:10px;

}

.qpa-order-button-display{
    float:right;
    margin-top:2px;
    position:absolute;
    top:120px;
    left:30%;    
    width:800px;
    z-index: 999!important;
    border-style:none;
    height:500px;    
}

.qpa-order-button-hide{
 position:relative;
 top:0px;
 left:0px;
 height:0px;
 width:0px;
 visibility:hidden;

}



#hidden-qpa-button .display-window{
    height:80%;
}
#hidden-qpa-button .action-window{
    height:20%;
}

#hidden-qpa-button .display-window .hidden-element{
    height:100%;
    width:100%;
    opacity:0.9;
    font-size:90px;
    vertical-align:central;
    text-align:center;
    padding-top:20px;
    padding-bottom:20px;
}

/* QPA Print Section - make it visible in the flow */
#qpa-print-section{
    position: relative;
    width: 100%;
    background-color: white;
    color: black;
    margin: 0;
    padding: 0;
}

.items-table{
    height:350px;
    overflow:auto;
    background-color:lightcyan;
    color:black;
}

