﻿.pos-wrapper {
    display: flex;
    height: calc(100vh - 80px);
    overflow: hidden;
}

/* LEFT PANEL */
.pos-left {
    width: 78%;
    padding: 8px;
    display: flex;
    flex-direction: column;
}

.pos-search {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    margin-bottom: 8px;
}

.pos-table-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #dcdcdc;
}

.pos-table {
    width: 100%;
    border-collapse: collapse;
}

    .pos-table thead {
        background: #eef4ff;
        position: sticky;
        top: 0;
    }

    .pos-table th,
    .pos-table td {
        border-bottom: 1px solid #ddd;
        padding: 8px;
        font-size: 13px;
    }

/* Bottom Button Bar */
.pos-left-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.pos-btn {
    padding: 12px;
    background: #e8f2ff;
    border: 1px solid #bcd6ff;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

/* RIGHT PANEL */
.pos-right {
    width: 22%;
    padding: 10px;
    border-left: 1px solid #ddd;
    background: #fafafa;
    display: flex;
    flex-direction: column;
}

.pos-block {
    margin-bottom: 12px;
}

.autocomplete-box {
    position: absolute;
    z-index: 999;
    background: #fff;
    border: 1px solid #ddd;
    width: 100%;
}

/* Total Box */
.pos-total-box {
    background: #e7f0ff;
    border: 1px solid #b7d2ff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.total-label {
    font-size: 20px;
    font-weight: 600;
}

.full-breakup {
    font-size: 12px;
    float: right;
    color: #007bff;
    cursor: pointer;
}

/* Change Box */
.pos-change-box {
    margin-top: 10px;
    padding: 8px;
    border-top: 1px dashed #ccc;
    font-size: 15px;
    font-weight: 600;
}

/* Right Side Buttons */
.pos-right-buttons {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pos-save {
    background: #c0f8d8;
    border: 1px solid #87e9b4;
    flex: 1;
    padding: 12px;
    font-size: 14px;
}

.pos-other {
    background: #e7f0ff;
    border: 1px solid #bcd6ff;
    flex: 1;
    padding: 12px;
    font-size: 14px;
}
/* Autocomplete dropdown container */
.autocomplete-list {
    position: absolute;
    top: 48px; /* Adjust to match your input height */
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #cfcfcf !important;
    border-radius: 6px;
    padding: 0;
    z-index: 9999;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.15);
}

    /* Hide by default */
    .autocomplete-list.d-none {
        display: none !important;
    }

    /* Table styling inside dropdown */
    .autocomplete-list table {
        width: 100%;
        border-collapse: collapse;
    }

    .autocomplete-list thead {
        position: sticky;
        top: 0;
        background: #f1f5ff;
        font-weight: 600;
        font-size: 13px;
        z-index: 2;
    }

    .autocomplete-list th,
    .autocomplete-list td {
        padding: 8px 10px;
        font-size: 13px;
        border-bottom: 1px solid #eee;
    }

/* Make cursor pointer everywhere on row */
.autocomplete-item td {
    cursor: pointer;
}
.autocomplete-list tr.active-row:hover td,
.autocomplete-list tr.active-row td {
    background-color: #d8e6ff !important;
    font-weight: 600;
}
.autocomplete-item:hover {
    background: #e6f0ff !important;
}

.autocomplete-item.active-row {
    background: #d8e6ff !important;
}
/* make readonly inputs look like plain text inside table */
.readonly-field {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0;
    height: auto;
    text-align: right;/*
    font-weight: 500;*/
    color: #111;
}

/* center certain cells */
.qty-cell .readonly-field,
.itm-code,
.unit-cell {
    text-align: left;
}

/* ensure table alignment for total / price */
.price-cell .readonly-field,
.tax-cell .readonly-field,
.total-cell .readonly-field,
.discount-cell .readonly-field {
    text-align: right;
    min-width: 80px;
}
.selected-row {
    background-color: #d7f0ff !important;
    border-left: 4px solid #007bff;
}
/* Overlay */
.qty-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

/* Modal box */
.qty-modal {
    background: white;
    width: 380px;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
    animation: fadeInScale 0.15s ease-out;
}

/* Header */
.qty-header {
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #e3e3e3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qty-close-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #777;
}

    .qty-close-btn:hover {
        color: #333;
    }

/* Body */
.qty-body {
    padding: 18px 16px;
}

.weighing-link {
    font-size: 13px;
    margin-top: 6px;
    display: inline-block;
}

/* Footer */
.qty-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e3e3e3;
}

/* Animation */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}
/* Overlay */
.discount-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5500;
}

/* Modal Box */
.discount-modal {
    background: white;
    width: 420px;
    border-radius: 10px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
    animation: zoomFade 0.2s ease-out;
    padding: 0;
}

/* Header */
.discount-header {
    padding: 14px 18px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #e3e3e3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.discount-close-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #777;
}

    .discount-close-btn:hover {
        color: #222;
    }

/* Body */
.discount-body {
    padding: 20px 18px;
}

    .discount-body .input-group input {
        font-size: 16px;
    }

/* Footer */
.discount-footer {
    padding: 12px 18px;
    border-top: 1px solid #e3e3e3;
    display: flex;
    justify-content: space-between;
}

/* Animation */
@keyframes zoomFade {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}
.discount-section {
    border: 1px solid #b7d2ff;
    padding: 12px;
    border-radius: 6px;
    background: #e7f0ff;
    display: none;
}
.qr-col {
    display: flex;
    justify-content: center; /* center left-right */
    align-items: center; /* center top-bottom */
    padding-top: 5px; /* optional fine tuning */
}

    .qr-col button {
        height: 42px;
        width: 42px;
        border-radius: 10px;
        font-size: 18px;
    }
/* Overlay (dark background) */
.bill-breakup-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

/* Modal Box */
.bill-breakup-modal {
    width: 420px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    animation: fadeInScale .15s ease-out;
}

/* Animation */
@keyframes fadeInScale {
    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Header */
.bill-breakup-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

/* Close button */
.bill-breakup-modal .close-btn {
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
}

    .bill-breakup-modal .close-btn:hover {
        color: #333;
    }

/* Modal Body */
.bill-breakup-modal .modal-body {
    padding: 20px 24px;
    font-size: 16px;
}

/* Total Highlighted Row */
.total-row {
    background: #e8ffe8;
    padding: 12px;
    border-radius: 6px;
    margin-top: 14px;
    font-weight: 600;
}
.pos-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.pos-modal-box {
    background: white;
    padding: 20px;
    width: 350px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
/* MODAL BACKDROP */
.mp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    backdrop-filter: blur(2px);
}

/* MODAL BOX */
.mp-box {
    width: 480px;
    background: #ffffff;
    border-radius: 14px;
    padding: 20px 22px;
    animation: fadeSlide .25s ease;
    box-shadow: 0 10px 35px rgba(0,0,0,0.25);
}

/* ANIMATION */
@keyframes fadeSlide {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* HEADER */
.mp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .mp-header h5 {
        font-size: 18px;
        font-weight: 600;
    }

.mp-close {
    border: none;
    background: transparent;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    transition: .2s ease;
}

    .mp-close:hover {
        color: #000;
        transform: scale(1.15);
    }

/* TABLE */
.modern-table th {
    font-weight: 600;
    color: #444;
    border-bottom-width: 2px !important;
}

.modern-table tbody tr {
    vertical-align: middle;
}

.modern-table input {
    height: 32px;
    border-radius: 6px;
}

/* FOOTER */
.mp-footer .btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 6px 14px;
}

#mpSave {
    background: #28a745 !important;
    border-color: #28a745 !important;
}

    #mpSave:hover {
        opacity: 0.9;
    }

#mpCancel:hover {
    background: #f8f9fa;
}
.active-party {
    background-color: #0d6efd !important;
    color: #fff !important;
}