/**
 * ESG POS Styles
 * assets/css/pos-style.css
 */

:root {
    --esg-primary: #10b981;
    --esg-primary-dark: #059669;
    --esg-danger: #ef4444;
    --esg-danger-dark: #dc2626;
    --esg-warning: #f59e0b;
    --esg-info: #3b82f6;
    --esg-secondary: #6b7280;
    --esg-success: #10b981;
    --esg-bg: #f9fafb;
    --esg-card-bg: #ffffff;
    --esg-border: #e5e7eb;
    --esg-text: #111827;
    --esg-text-light: #6b7280;
}

/* Standalone Mode - Hide WordPress UI */
body.esg-pos-standalone #wpadminbar,
body.esg-pos-standalone #adminmenumain,
body.esg-pos-standalone #adminmenuback,
body.esg-pos-standalone .update-nag,
body.esg-pos-standalone #wpfooter {
    display: none !important;
}

body.esg-pos-standalone #wpcontent,
body.esg-pos-standalone #wpbody {
    margin-left: 0 !important;
    padding-left: 0 !important;
}


body.esg-pos-standalone #esg-pos-container {
    margin: 0 !important;
}





/* Screen Management */
.esg-screen {
    display: none;
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}


.esg-screen.active {
    display: flex;
}




/* Setup Screen */
#esg-pos-setup {
    background: linear-gradient(135deg, var(--esg-primary) 0%, var(--esg-primary-dark) 100%);
    justify-content: center;
    align-items: center;
}

.esg-setup-wrapper {
    text-align: center;
    color: white;
    max-width: 500px;
    width: 90%;
}

.esg-setup-wrapper .esg-logo h1 {
    font-size: 4em;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.esg-setup-wrapper .esg-logo p {
    font-size: 1.5em;
    margin: 0 0 60px 0;
    opacity: 0.9;
}

.esg-setup-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    color: var(--esg-text);
}

.esg-setup-content h2 {
    margin: 0 0 15px 0;
    font-size: 1.8em;
}

.esg-setup-content > p {
    margin: 0 0 30px 0;
    color: var(--esg-text-light);
}

.esg-setup-pin-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0 25px 0;
    padding: 15px;
    background: var(--esg-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.esg-setup-pin-display.active-field {
    background: #e0f2fe;
    border: 2px solid var(--esg-primary);
}

.esg-setup-pin-display .pin-dot {
    width: 18px;
    height: 18px;
    border: 3px solid var(--esg-border);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.esg-setup-pin-display .pin-dot.filled {
    background: var(--esg-primary);
    border-color: var(--esg-primary);
}

.esg-setup-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 30px 0 20px 0;
}

.setup-num-btn {
    width: 100%;
    height: 70px;
    border: 2px solid var(--esg-border);
    background: white;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--esg-text);
}

.setup-num-btn:hover {
    background: var(--esg-primary);
    color: white;
    border-color: var(--esg-primary);
    transform: scale(1.05);
}

.setup-num-btn:active {
    transform: scale(0.95);
}

.setup-num-btn.setup-clear,
.setup-num-btn.setup-back {
    font-size: 16px;
}

#complete-setup-btn {
    width: 100%;
    margin-top: 10px;
}

#complete-setup-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#complete-setup-btn:disabled:hover {
    transform: none;
}

/* Menu Screen */
#esg-pos-menu {
    background: linear-gradient(135deg, var(--esg-primary) 0%, var(--esg-primary-dark) 100%);
    justify-content: center;
    align-items: center;
}

.esg-menu-wrapper {
    text-align: center;
    color: white;
}

.esg-logo h1 {
    font-size: 4em;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.esg-logo p {
    font-size: 1.5em;
    margin: 0 0 60px 0;
    opacity: 0.9;
}

.esg-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Buttons */
.esg-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
}

.esg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.esg-btn:active {
    transform: translateY(0);
}

.esg-btn-large {
    min-width: 300px;
    min-height: 70px;
    font-size: 18px;
}

.esg-btn-small {
    padding: 8px 16px;
    min-height: 36px;
    font-size: 14px;
}

.esg-btn-primary {
    background: var(--esg-primary);
    color: white;
}

.esg-btn-primary:hover {
    background: var(--esg-primary-dark);
}

.esg-btn-secondary {
    background: var(--esg-secondary);
    color: white;
}

.esg-btn-success {
    background: var(--esg-success);
    color: white;
}

.esg-btn-danger {
    background: var(--esg-danger);
    color: white;
}

.esg-btn-danger:hover {
    background: var(--esg-danger-dark);
}

.esg-btn-warning {
    background: var(--esg-warning);
    color: white;
}

.esg-btn-info {
    background: var(--esg-info);
    color: white;
}

.esg-btn-cancel {
    background: var(--esg-secondary);
    color: white;
}

.esg-btn-icon {
    padding: 10px;
    min-width: auto;
}

/* Login Screen */
#esg-pos-login {
    justify-content: center;
    align-items: center;
    background: var(--esg-bg);
}

.esg-login-wrapper {
    background: var(--esg-card-bg);
    padding: 60px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.esg-login-wrapper h2 {
    margin: 0 0 40px 0;
    color: var(--esg-text);
    font-size: 2em;
}

.esg-pin-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.pin-dot {
    width: 20px;
    height: 20px;
    border: 3px solid var(--esg-border);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.pin-dot.filled {
    background: var(--esg-primary);
    border-color: var(--esg-primary);
}

.esg-pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.pin-btn {
    width: 80px;
    height: 80px;
    border: 2px solid var(--esg-border);
    background: white;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pin-btn:hover {
    background: var(--esg-primary);
    color: white;
    border-color: var(--esg-primary);
    transform: scale(1.05);
}

.pin-btn:active {
    transform: scale(0.95);
}

/* Float Screen */
#esg-pos-float {
    justify-content: center;
    align-items: center;
    background: var(--esg-bg);
}

.esg-float-wrapper {
    background: var(--esg-card-bg);
    padding: 60px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 500px;
}

.esg-float-wrapper h2 {
    margin: 0 0 20px 0;
    font-size: 2em;
}

.esg-float-wrapper > p {
    margin: 0 0 40px 0;
    color: var(--esg-text-light);
    font-size: 1.1em;
}

.esg-float-input-wrapper {
    position: relative;
    margin-bottom: 40px;
}

.currency-symbol {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
    color: var(--esg-text-light);
}

#float-amount {
    width: 100%;
    padding: 20px 20px 20px 60px;
    font-size: 2em;
    border: 2px solid var(--esg-border);
    border-radius: 8px;
    text-align: center;
}

.esg-float-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}


.esg-cart-section {
    height: 100%;
}


/* Main POS Screen */
#esg-pos-main {
    flex: 1;              /* 👈 THIS is missing */
    display: flex;
    flex-direction: column;
    height: 100%;
}




#esg-pos-main.esg-screen.active {
    display: flex;
    flex-direction: column;
    height: 100vh;
}




.esg-pos-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 2px solid var(--esg-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 90px;
}

.esg-header-left h2 {
    margin: 0;
    color: var(--esg-text);
    font-size: 1.8em;
}

.esg-header-left p {
    margin: 0;
    color: var(--esg-text-light);
    font-size: 1.1em;
}

.esg-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

#current-time {
    font-size: 1.2em;
    color: var(--esg-text-light);
    font-weight: 500;
}

.esg-pos-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Main POS content */
.esg-pos-content {
    flex: 1;
    background: #f8fafc;
    overflow: auto;
}

/* Products Section */
.esg-products-section {
    flex: 1;
    overflow-y: auto;
}
.esg-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#product-search {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--esg-border);
    border-radius: 8px;
    font-size: 16px;
}

.esg-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.esg-product-card {
    background: white;
    border: 2px solid var(--esg-border);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.esg-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--esg-primary);
}

.esg-product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.esg-product-card h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--esg-text);
    min-height: 40px;
}

.esg-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--esg-primary);
}

.esg-product-stock {
    font-size: 12px;
    color: var(--esg-text-light);
    margin-top: 5px;
}

/* Cart Section */
.esg-cart-section {
    background: white;
    border-left: 2px solid var(--esg-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 450px; /* â† ADD THIS */
    width: 100%; /* â† ADD THIS */
}

.esg-cart-header {
    padding: 20px;
    border-bottom: 2px solid var(--esg-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.esg-cart-header h3 {
    margin: 0;
    font-size: 1.4em;
}

.esg-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.esg-empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: var(--esg-text-light);
}

.esg-empty-cart .dashicons {
    font-size: 80px;
    opacity: 0.3;
    margin-bottom: 15px;
}

.esg-empty-cart p {
    font-size: 1.2em;
}


.esg-cart-totals {
    padding: 20px;
    border-top: 2px solid var(--esg-border);
    border-bottom: 2px solid var(--esg-border);
}




.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.total-grand {
    font-size: 20px;
    font-weight: 700;
    color: var(--esg-primary);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid var(--esg-border);
}

.esg-cart-actions {
    padding: 15px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.esg-cart-actions .esg-btn {
    padding: 12px 8px;
    font-size: 13px;
    min-height: 50px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.esg-cart-actions .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.esg-btn-checkout {
    margin: 20px;
    margin-top: 0;
}

/* Payment Screen */
#esg-pos-payment {
    justify-content: center;
    align-items: center;
    background: var(--esg-bg);
}

.esg-payment-wrapper {
    background: white;
    padding: 60px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 600px;
}

.esg-payment-wrapper h2 {
    margin: 0 0 30px 0;
    font-size: 2em;
}

.esg-payment-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.8em;
    font-weight: 700;
    padding: 20px;
    background: var(--esg-bg);
    border-radius: 8px;
    margin-bottom: 40px;
    color: var(--esg-primary);
}

.esg-payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.esg-payment-btn {
    padding: 40px 20px;
    border: 3px solid var(--esg-border);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.esg-payment-btn:hover {
    border-color: var(--esg-primary);
    background: var(--esg-primary);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.esg-payment-btn .dashicons {
    font-size: 60px;
}

.esg-payment-btn span:last-child {
    font-size: 18px;
    font-weight: 600;
}


.spin {
    animation: esg-spin 1s linear infinite;
}

@keyframes esg-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}


/* Settings Screen */
#esg-pos-settings {
    flex-direction: column;
    background: var(--esg-bg);
}

.esg-settings-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.esg-settings-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 2px solid var(--esg-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.esg-settings-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.esg-settings-tabs {
    background: white;
    padding: 0 30px;
    border-bottom: 2px solid var(--esg-border);
    display: flex;
    gap: 10px;
}

.esg-tab-btn {
    padding: 15px 25px;
    border: none;
    background: transparent;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--esg-text-light);
    transition: all 0.3s ease;
}

.esg-tab-btn:hover {
    color: var(--esg-primary);
}

.esg-tab-btn.active {
    color: var(--esg-primary);
    border-bottom-color: var(--esg-primary);
}

.esg-settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.esg-tab-content {
    display: none;
}

.esg-tab-content.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--esg-text);
}

.esg-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--esg-border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

.esg-input:focus {
    outline: none;
    border-color: var(--esg-primary);
}

/* Employee List */
#employees-list {
    margin-top: 20px;
}

.employee-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 2px solid var(--esg-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.employee-info h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.employee-info p {
    margin: 0;
    color: var(--esg-text-light);
    font-size: 14px;
}

.employee-actions {
    display: flex;
    gap: 10px;
}

/* Modal */
.esg-modal-overlay {
    padding: 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: none;
}

.esg-modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.esg-modal {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;  /* ADD THIS */
    margin: auto;        /* ADD THIS */
}

.esg-modal-content {
    padding: 4px;
}

.esg-modal h3 {
    margin: 0 0 30px 0;
    font-size: 2em;
    font-weight: 700;
    color: var(--esg-text);
}



/* Product Modal Specific Styles */
.product-modal-section {
    margin-bottom: 30px;
}

.product-modal-section label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--esg-text);
}

.product-modal-section label strong {
    font-size: 24px;
    margin-left: 10px;
}

/* Quantity Selector - BIGGER */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: var(--esg-bg);
    padding: 25px;
    border-radius: 12px;
    border: 3px solid var(--esg-border);
}

.qty-control-btn {
    width: 70px;
    height: 70px;
    border: 3px solid var(--esg-border);
    background: white;
    border-radius: 12px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--esg-text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-control-btn:hover {
    background: var(--esg-primary);
    color: white;
    border-color: var(--esg-primary);
    transform: scale(1.08);
}

.qty-control-btn:active {
    transform: scale(0.95);
}

.qty-input-wrapper {
    min-width: 120px;
}

.qty-input-wrapper input {
    width: 100%;
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    padding: 15px;
    border: 3px solid var(--esg-border);
    border-radius: 10px;
}

/* Stock Editor */
.stock-editor {
    background: #fffbeb;
    border: 2px solid #fbbf24;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
}

.stock-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #92400e;
}

.stock-current {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--esg-text);
}

.stock-current strong {
    font-size: 20px;
    color: var(--esg-primary);
}

#modal-stock-input {
    font-size: 20px;
    padding: 15px;
}

.stock-warning {
    font-size: 13px;
    color: #92400e;
    margin-top: 10px;
    font-weight: 500;
}

.permission-denied {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 500;
}

/* Modal Actions - BIGGER BUTTONS */
.product-modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.product-modal-actions .esg-btn {
    flex: 1;
    padding: 20px 25px;
    font-size: 18px;
    font-weight: 700;
    min-height: 65px;
}

.product-modal-actions .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Reports */
.esg-reports-filters {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 30px;
}

#reports-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--esg-border);
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--esg-bg);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.summary-card h4 {
    margin: 0 0 10px 0;
    color: var(--esg-text-light);
    font-size: 14px;
    font-weight: 600;
}

.summary-card .amount {
    font-size: 2em;
    font-weight: 700;
    color: var(--esg-primary);
}

/* Responsive */
@media (max-width: 1400px) {
    .esg-pos-body {
        grid-template-columns: 1fr 400px;
    }
}

@media (max-width: 1200px) {
    .esg-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.esg-cart-item {
    animation: slideIn 0.3s ease;
}

/* Loading State */
.esg-loading {
    text-align: center;
    padding: 40px;
    color: var(--esg-text-light);
}

.esg-loading::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}




.esg-drawer-modal {
  width: fit-content;
    min-width: 900px;
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px 14px;
}

.esg-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.esg-drawer-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.esg-drawer-table-wrap {
  overflow-x: visible;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.esg-drawer-table {
    width: max-content;   /* table defines width */
    min-width: 1100px;    /* professional POS width */
    border-collapse: collapse;
}


.esg-drawer-modal { padding: 18px; }
.esg-drawer-header h2 { margin: 0 0 6px 0; font-size: 20px; }
.esg-drawer-sub { color: #6b7280; font-size: 13px; margin-bottom: 14px; }

.esg-drawer-table-wrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.esg-drawer-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  background: #fff;
}

.esg-drawer-table th, .esg-drawer-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}

.esg-drawer-table thead th {
  position: sticky;
  top: 0;
  background: #f9fafb;
  z-index: 1;
  text-align: left;
  font-weight: 700;
  color: #111827;
}

.esg-drawer-table td .esg-input {
  width: 100%;
  min-width: 140px;
  padding: 8px 10px;
  font-size: 13px;
}

.esg-drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.esg-drawer-table tr.saved {
  outline: 2px solid rgba(16,185,129,0.35);
}

 



/* Cash Tendering Modal */
.esg-cash-tendering {
    width: 100%;
}

.esg-cash-tendering h2 {
    color: var(--esg-text);
    font-weight: 700;
}

/* Tender Input - Larger */
#cash-tender-input {
    text-align: center;
}

#cash-tender-input::placeholder {
    color: #d1d5db;
}

#cash-tender-input:focus {
    outline: none;
    border-color: var(--esg-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Change Display - Fixed Position, Always Visible */
#change-display {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Tender Numpad - MUCH LARGER for touchscreen */
.tender-num-btn {
    height: 100px;
    font-size: 36px;
    font-weight: 700;
    background: white;
    border: 3px solid var(--esg-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--esg-text);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tender-num-btn:hover {
    background: var(--esg-primary);
    color: white;
    border-color: var(--esg-primary);
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tender-num-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Quick Amount Buttons - Larger */
.quick-amount {
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.15s ease;
}

.quick-amount:hover {
    background: var(--esg-primary);
    color: white;
    border-color: var(--esg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.quick-amount:active {
    transform: translateY(0);
}

/* Complete Payment Button - LARGE and prominent */
#complete-cash-payment {
    background: var(--esg-success);
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#complete-cash-payment:hover {
    background: var(--esg-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

#complete-cash-payment:active {
    transform: translateY(0);
}

/* Cancel Button */
#cancel-cash-tender {
    background: white;
    color: var(--esg-text);
    border: 3px solid var(--esg-border);
    transition: all 0.15s ease;
}

#cancel-cash-tender:hover {
    background: var(--esg-bg);
    border-color: var(--esg-danger);
    color: var(--esg-danger);
    transform: translateY(-2px);
}

#cancel-cash-tender:active {
    transform: translateY(0);
}

/* Responsive Design for Smaller Screens */
@media (max-width: 1200px) {
    .esg-cash-tendering h2 {
        font-size: 28px;
    }
    
    .tender-num-btn {
        height: 85px;
        font-size: 32px;
    }
}

@media (max-width: 992px) {
    .esg-modal {
        max-width: 95%;
        padding: 30px;
    }
    
    /* Stack columns on smaller screens */
    .esg-cash-tendering > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tender-num-btn {
        height: 75px;
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .esg-modal {
        padding: 20px;
        max-height: 98vh;
    }
    
    .esg-cash-tendering h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .tender-num-btn {
        height: 65px;
        font-size: 24px;
    }
    
    #cash-tender-input {
        font-size: 32px;
    }
    
    #change-amount {
        font-size: 42px;
    }
}

/* Smooth transitions for change display color changes */
#change-display, #change-amount, #change-label {
    transition: all 0.3s ease;
}

/* Focus state for accessibility */
.tender-num-btn:focus,
#complete-cash-payment:focus,
#cancel-cash-tender:focus {
    outline: 3px solid var(--esg-primary);
    outline-offset: 2px;
}

/* Improve button touch feedback on mobile */
@media (hover: none) and (pointer: coarse) {
    .tender-num-btn:active {
        background: var(--esg-primary);
        color: white;
    }
}


.esg-customer-row {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.esg-customer-row:hover,
.esg-customer-row.active {
    background: #f2f7ff;
}



.esg-customer-row {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.esg-customer-row:hover {
    background: #f5f7fa;
}

#esg-customer-view {
    position: fixed;
    inset: 0;                 /* top:0 right:0 bottom:0 left:0 */
    background: #ffffff;
    z-index: 100000;          /* higher than menu & POS */
    overflow-y: auto;
    display: none;
}

#esg-customer-view.active {
    display: block;
}


.esg-customer-wrapper {
    margin-top: 0;
    background: #fff;
    max-width: 900px;
    
    padding: 12px;
    border-radius: 8px;
}

#esg-customer-list {
    margin-top: 8px;
}

.esg-customer-wrapper h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.customer-item:first-child {
    margin-top: 0;
}



/*
 * UPDATED CART STYLES - Single Line, Larger Buttons & Fonts
 * Replace or add to your pos-style.css file
 */
 
 .esg-cart-customer {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

 
 

/* Cart Item - SINGLE LINE LAYOUT */
.esg-cart-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 15px !important;
    background: white !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
    gap: 12px !important;
    min-height: 65px !important;
}

.esg-cart-item:hover {
    border-color: #d1d5db !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Product Name - Takes available space */
.cart-item-name {
    flex: 1 1 auto !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    line-height: 1.3 !important;
    max-width: 220px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
}


.cart-item-left {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.discount-row {
    display: flex;
    gap: 8px;
    font-size: 11px;
    margin-top: 4px;
}

.discount-badge {
    color: #15803d;
    font-weight: 700;
}

.discount-savings {
    color: #166534;
    font-weight: 600;
}




.esg-cart-item.has-discount {
  border-left: 4px solid #2ecc71;
}



/* Quantity Controls Container */
.cart-item-controls {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #f9fafb !important;
    padding: 5px 8px !important;
    border-radius: 6px !important;
    border: 1px solid #e5e7eb !important;
    flex-shrink: 0 !important;
}

/* Plus/Minus Buttons - LARGE */
.qty-btn {
    width: 42px !important;
    height: 42px !important;
    border: 2px solid #d1d5db !important;
    background: white !important;
    border-radius: 6px !important;
    font-size: 24px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.qty-btn:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.qty-btn:active {
    transform: scale(0.95) !important;
}

/* Minus Button */
.qty-minus {
    color: #ef4444 !important;
    border-color: #fca5a5 !important;
    background: #fef2f2 !important;
}

.qty-minus:hover {
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
}


/* Plus Button */
.qty-plus {
    color: #10b981 !important;
    border-color: #6ee7b7 !important;
    background: #f0fdf4 !important;


.qty-plus:hover {
    background: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

/* Quantity Display */
.qty-display {
    min-width: 32px !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    padding: 0 8px !important;
}

/* Total Price - LARGE */
.cart-item-total {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    min-width: 75px !important;
    text-align: right !important;
    flex-shrink: 0 !important;
}

/* Remove Button - LARGE */
.cart-item-remove {
    width: 42px !important;
    height: 42px !important;
    border: 2px solid #fca5a5 !important;
    background: #fef2f2 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.cart-item-remove:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    transform: scale(1.08) !important;
}

.cart-item-remove:hover .dashicons {
    color: white !important;
}

.cart-item-remove .dashicons {
    color: #ef4444;
    font-size: 26px;
    width: 26px;
    height: 26px;
    transition: color 0.15s ease;
}

.cart-item-remove:active {
    transform: scale(0.95) !important;
}

/* Empty Cart */
.esg-empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.esg-empty-cart .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.esg-empty-cart p {
    font-size: 18px;
    margin: 0;
}

/* Tablet Screens */
@media (min-width: 768px) and (max-width: 1024px) {
    .qty-btn {
        width: 60px;
        height: 60px;
        font-size: 34px;
    }
    
    .cart-item-name {
        font-size: 18px;
    }
    
    .qty-display {
        font-size: 26px;
    }
    
    .cart-item-total {
        font-size: 24px;
    }
    
    .cart-item-remove {
        width: 55px;
        height: 55px;
    }
}

/* Mobile Screens */
@media (max-width: 767px) {
    .esg-cart-item {
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px;
    }
    
    .cart-item-name {
        flex: 1 1 100%;
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .cart-item-controls {
        flex: 1;
    }
    
    .cart-item-total {
        flex: 1;
        text-align: center;
        font-size: 22px;
        min-width: auto;
    }
    
    .cart-item-remove {
        flex: 0 0 auto;
    }
    
    .qty-btn {
        width: 55px;
        height: 55px;
        font-size: 32px;
    }
    
    .qty-display {
        font-size: 24px;
    }
}

/* Large Screens (Extra large buttons) */
@media (min-width: 1200px) {
    .qty-btn {
        width: 70px;
        height: 70px;
        font-size: 42px;
    }
    
    .cart-item-remove {
        width: 65px;
        height: 65px;
    }
    
.cart-item-remove .dashicons {
    color: #ef4444 !important;
    font-size: 20px !important;
    width: 20px !important;
    height: 20px !important;
}
    
    .qty-display {
        font-size: 32px;
        min-width: 60px;
    }
    
    .cart-item-name {
        font-size: 22px;
    }
    
    .cart-item-total {
        font-size: 28px;
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .qty-btn {
        width: 70px;
        height: 70px;
        font-size: 40px;
    }
    
    .cart-item-remove {
        width: 65px;
        height: 65px;
    }
    
    .qty-display {
        font-size: 30px;
    }
}

/* Focus States for Accessibility */
.qty-btn:focus,
.cart-item-remove:focus {
    outline: 3px solid #10b981;
    outline-offset: 2px;
}

/* Menu Toggle Button (in Header) */
.esg-menu-toggle-header {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    z-index: 1000;
}

.esg-menu-toggle-header:hover {
    background: var(--esg-primary);
    color: white;
    border-color: var(--esg-primary);
    transform: scale(1.05);
}

.esg-menu-toggle-header .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Header layout with hamburger */
.esg-header-left {
    display: flex;
    align-items: center;
}

.esg-header-info h2 {
    margin: 0 0 5px 0;
    color: var(--esg-text);
    font-size: 1.8em;
}

.esg-header-info p {
    margin: 0;
    color: var(--esg-text-light);
    font-size: 1.1em;
}

.esg-header-text p {
    margin: 0;
}

/* ==================== MENU MODAL (REPLACES SLIDING MENU) ==================== */

#esg-menu-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    z-index: 1000000;
    pointer-events: auto;
}


#esg-menu-modal-overlay.active {
    transform: translateX(0);
}


.esg-menu-modal {
    display: flex;
    height: 100vh;
    background: #0f172a;
}


.esg-menu-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}



.esg-submenu-greeting {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 12px;
}

.esg-submenu-greeting h3 {
    margin: 0;
    font-size: 16px;
    color: #e5e7eb;
}

.esg-submenu-greeting p {
    margin: 0;
    font-size: 13px;
    color: #9ca3af;
}


.esg-submenu-header {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 16px;
}

.esg-submenu-header .esg-menu-toggle-header {
    all: unset;
    cursor: pointer;
    color: #e5e7eb;
}

.esg-submenu-header .dashicons {
    font-size: 22px;
}

.esg-submenu-header h2 {
    margin: 0;
    font-size: 16px;
    color: #e5e7eb;
}

.esg-submenu-header p {
    margin: 0;
    font-size: 13px;
    color: #9ca3af;
}

.esg-submenu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}





/* DEFAULT: submenu hidden */
.esg-pos-submenu {
    display: none !important;
    visibility: hidden;
    flex-direction: column;
    width: 260px;
    background: #0f172a;
}


/* VISIBLE STATE */
.esg-pos-submenu.active {
    display: flex !important;
    visibility: visible;
   
}


.submenu-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin-bottom: 8px;
}

.esg-pos-submenu button {
    width: auto;           /* 👈 NOT 100vw */
    max-width: 100%;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;
    margin-bottom: 8px;

    flex: 0 0 auto;        /* 👈 IMPORTANT */
}







.esg-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #2271b1;
    color: white;
}

.esg-menu-header h3 {
    margin: 0;
    font-size: 20px;
}

.esg-menu-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    font-size: 24px;
}

.esg-menu-close .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.esg-menu-close:hover {
    opacity: 0.8;
}

/* Menu Tabs - Horizontal for modal */
.esg-menu-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: #f5f5f5;
    padding: 0 20px;
}

.esg-menu-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    text-align: left;
    font-size: 16px;
    transition: all 0.2s ease;
}

.esg-menu-tab:hover {
    background: #e8e8e8;
}

.esg-menu-tab.active {
    background: white;
    border-bottom-color: #2271b1;
    font-weight: 600;
    color: #2271b1;
}

.esg-menu-tab .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Menu Content */
.esg-menu-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.esg-menu-tab-content {
    display: none;
}

.esg-menu-tab-content.active {
    display: block;
}

/* Transaction Filters */
.esg-transaction-filters {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-row {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-row label {
    font-weight: 600;
    min-width: 80px;
}

.filter-row input,
.filter-row select {
    flex: 1;
}

/* Transaction List */
.esg-transaction-list {
    max-height: 500px;
    overflow-y: auto;
}

.esg-transaction-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.esg-transaction-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.transaction-order-number {
    font-weight: 600;
    font-size: 16px;
    color: #2271b1;
}

.transaction-amount {
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
}

.transaction-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.transaction-meta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.transaction-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.transaction-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.transaction-actions .esg-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
}

/* Loading State */
.esg-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Pagination */
.esg-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.esg-pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.esg-pagination button:hover {
    background: #f5f5f5;
}

.esg-pagination button.active {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.esg-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ============================================
   BARCODE SCANNER FEEDBACK STYLES
   ============================================ */

/* Barcode Scanner Feedback Messages */
.barcode-feedback {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    z-index: 999999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: slideDownFade 0.3s ease;
}

.barcode-success {
    background: #10b981;
    color: white;
}

.barcode-error {
    background: #ef4444;
    color: white;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Focus States for Barcode Scanner Visibility */
.esg-product-card:focus-within {
    outline: 3px solid var(--esg-primary);
    outline-offset: 2px;
}






#esg-pos-container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
}


.esg-pos-layout {
    
  /*  display: flex;*/
    width: 100%;
    height: 100%;
    flex-direction: row;  

    overflow: hidden;
}



/* Slide main screen 
#esg-pos-container.menu-active .esg-pos-submenu {
    transform: translateX(0);
}

*/

#esg-pos-container.menu-active #esg-pos-main {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}





