/* Thin Scroll CSS Start */
.thin-scroll {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
.thin-scroll::-webkit-scrollbar {
    width: 6px;
}
.thin-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.thin-scroll::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
.thin-scroll:hover::-webkit-scrollbar-thumb {
    background-color: #bdbdbd;
}
.thin-scroll:hover {
    scrollbar-color: #bdbdbd transparent;
}
/* Thin Scroll CSS End */

/* Template  Customization */
.modal-dialog-scrollable .modal-header {
    padding: 1.5rem !important;
}
.modal-dialog-scrollable .modal-footer {
    padding: 1.5rem !important;
}
/* Template  Customization */



/* Basic Datatable CSS */
.datatable-action i {
    font-size: 18px !important;
}
.datatable-action i.delete {
    color: red;
}
.card-datatable .row {
    padding-inline-end: 1.25rem !important;
    padding-inline-start: 1.25rem !important;
}
.card-datatable .dropdown-menu {
    box-shadow: var(--bs-dropdown-box-shadow);
    text-align: start;
    max-width: 120px !important;
    --bs-dropdown-min-width: 132px !important;
}
#modal_pos_sale_returns .modal-fullscreen .modal-body {
    overflow-x: hidden;
}
/* Basic Datatable CSS End */


.pos-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f5f5f5;
}

/* Header Section */
.pos-products-header, .pos-cart-header {
    height: 60px;
}

.pos-cart-header .customer-section, .pos-cart-header .employee-section {
    flex-grow: 1;
    width: 50%;
}
.customer-employee-section {
    display: flex;
    gap: 10px;
    flex-grow: 1;
}
.pos-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pos-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pos-header-left .dashboard-btn i {
    margin-right: 5px;
}
.pos-header-left button, .pos-header-left a {
    height: 36px;
}
.customer-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mobile-menu-toggler {
    display: none;
}

/* POS Header Search */
.pos-header-search-wrapper {
    position: relative;
}

.pos-header-search-toggler {
    /* background: #f5f5f5; */
    border: 1px solid #e0e0e0;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pos-header-search-toggler:hover {
    background: #e9ecef;
    border-color: #d0d0d0;
    color: #495057;
}

.pos-header-search-toggler i {
    font-size: 18px;
}

/* POS Autocomplete Styles */
#pos-autocomplete {
    z-index: 9999;
    position: relative;
}

#pos-autocomplete .aa-DetachedSearchButton {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    overflow: hidden;
}

#pos-autocomplete .aa-DetachedContainer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5vh;
}

#pos-autocomplete .aa-DetachedFormContainer {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

#pos-autocomplete .aa-Form {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

#pos-autocomplete .aa-Input {
    border: none;
    outline: none;
    font-size: 16px;
    width: 100%;
    background: transparent;
}

#pos-autocomplete .aa-Panel {
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

#pos-autocomplete .aa-DetachedCancelButton {
    background: transparent;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    color: #6c757d;
    font-size: 14px;
}

#pos-autocomplete .aa-DetachedCancelButton:hover {
    color: #495057;
}

#pos-autocomplete .search-headings {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #6c757d;
    padding: 10px 20px;
    margin: 0;
}

#pos-autocomplete .suggestion-item {
    padding: 10px 20px;
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

#pos-autocomplete .suggestion-item:hover {
    background: #f5f5f5;
}

#pos-autocomplete .suggestion-item i {
    font-size: 18px;
    color: #7367f0;
}

#pos-autocomplete .item-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

#pos-autocomplete .aa-Item {
    padding: 10px 20px;
    border-bottom: 1px solid #f0f0f0;
}

#pos-autocomplete .aa-Item:hover {
    background: #f5f5f5;
}

#pos-autocomplete .aa-Item a {
    text-decoration: none;
    color: #495057;
}

.pos-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.pos-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pos-register-btn {
    background: #7367f0;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
}

.pos-header-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

/* Main Content Area */
.pos-main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

/* Right Panel - Products */
.pos-products-panel {
    width: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
    overflow: hidden;
}
.pos-products-panel.show {
    display: flex;
}
.pos-products-panel.hide {
    display: none !important;
}

.pos-products-header {
    padding: 10px 10px 10px 0px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.pos-filter-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s;
}
.pos-filter-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}
.pos-search-input {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}
.pos-products-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}
.pos-products-grid {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    align-content: start;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
.pos-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.pos-product-card:hover {
    border-color: #7367f0;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

/* Product Grid Right Panel CSS */
.pos-products-grid .item-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer; 
}
.pos-products-grid .item-card img {
    width: 100%;
    display: block;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.pos-products-grid .item-card-image {
    border-bottom: 1px solid #e0e0e0;
    min-height: 137px;
}
.pos-products-grid .item-card-content {
    padding: 10px;
}
.pos-products-grid .item-card-content h5 {
    margin-bottom: 0px;
    font-size: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* number of lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pos-products-grid .item-card-content h6 {
    margin-bottom: 0px;
    font-size: 14px;
}
.pos-empty-state {
    text-align: center;
}
.pos-empty-state {
    opacity: 0.5;
}
.pos-empty-state i{
    font-size: 44px;
}

/* Medicine List View CSS */
.pos-products-list {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: block;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.pos-products-list .item-card-list {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.pos-products-list .item-card-list:hover {
    border-color: #7367f0;
    box-shadow: 0 2px 8px rgba(115, 103, 240, 0.15);
}

.pos-products-list .item-card-content-list {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.pos-products-list .item-card-info {
    flex: 1;
    min-width: 0;
}

.pos-products-list .item-card-title {
    margin-bottom: 5px;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-products-list .item-card-generic-name {
    font-size: 13px;
    margin-bottom: 0;
    color: #6c757d;
}

.pos-products-list .item-card-details {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-shrink: 0;
}

.pos-products-list .item-card-price,
.pos-products-list .item-card-stock {
    display: flex;
    align-items: center;
    gap: 3px;
}

.pos-products-list .price-label,
.pos-products-list .stock-label {
    font-size: 16px;
    color: #6c757d;
    font-weight: 500;
}

.pos-products-list .price-value,
.pos-products-list .stock-value {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

.pos-products-list .stock-unit {
    font-size: 12px;
    color: #6c757d;
}

/* Active item styling for keyboard navigation */
.pos-products-list .item-card-list.active,
.pos-products-grid .item-card.active {
    border-color: #7367f0;
    box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.25);
    background-color: #f8f9ff;
}

/* Category Panel - Inside Products Panel */
.outlet-name, .pos-category-panel {
    width: 190px;
}
.outlet-name {
    display: flex;
    align-items: center;
    justify-content: center;
}
.outlet-name span {
    border-left: 2px solid #e0e0e0;
    border-right: 2px solid #e0e0e0;
    width: 100%;
    justify-content: center;
    display: flex;
    font-weight: 600;
}
.pos-category-panel {
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
    overflow: hidden;
    flex-shrink: 0;
}
.pos-category-header {
    padding: 11px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    flex-shrink: 0;
    background: #fff;
    cursor: pointer;
}
.pos-category-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
.pos-category-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    font-weight: 500;
    background: #fff;
}
.pos-category-item:hover {
    background: #f8f9fa;
    border-color: #7367f0;
}
.pos-category-item.active {
    background: #7367f0;
    color: #fff;
    border-color: #7367f0;
}

/* Left Panel - Cart */
.pos-cart-panel {
    width: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.pos-cart-header {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.pos-customer-input {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}
.pos-add-btn {
    background: #7367f0;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}
.pos-cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid #e0e0e0;
}
.pos-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #adb5bd;
}
.pos-empty-cart-icon {
    opacity: 0.5;
}
.pos-empty-cart-icon i {
    font-size: 44px;
}
.pos-cart-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    flex-shrink: 0;
}
.pos-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pos-summary-label {
    font-size: 16px;
    color: #6c757d;
    font-weight: 600;
}
.pos-summary-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pos-summary-input {
    width: 100px;
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    text-align: right;
}
.pos-summary-input:focus {
    outline: none;
    border-color: #7367f0;
    box-shadow: 0 0 0 0.1rem rgba(115, 103, 240, 0.25);
}
.pos-toggle-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}
.pos-toggle-btn.active {
    background: #7367f0;
    color: #fff;
    border-color: #7367f0;
}
.pos-total-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fff;
}
.pos-total-label, .pos-total-value {
    font-size: 18px;
    font-weight: 700;
    color: #7367f0;
}
.pos-cash-register-btn {
    display: flex;
    align-items: center;
    gap: 3px;
}
.pos-total-amount-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.discount-type-select {
    height: 32px;
    border: 1px solid #dfe3e7;
    border-radius: 4px;
    width: 60px;
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}
.discount-type-select:focus {
    outline: none;
    border-color: #7367f0;
    box-shadow: 0 0 0 0.1rem rgba(115, 103, 240, 0.25);
}
.pos-footer-actions {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.layout-type {
    min-width: 186px;
    padding-left: 5px;
}


/* POS Cart, Table CSS */
.pos-cart-items {
    flex: 1;
    padding: 0;
    overflow-y: auto;
}
.pos-cart-items table {
    width: 100%;
}
.pos-cart-items thead th {
    position: sticky;
    top: 0;
    background: #eeeeee;
    z-index: 5;
    font-size: 16px;
    font-weight: 600;
    padding: 10px;
}
.pos-cart-items thead th:nth-child(2), .pos-cart-items thead th:nth-child(3), .pos-cart-items thead th:nth-child(4), .pos-cart-items tbody td:nth-child(2), .pos-cart-items tbody td:nth-child(3), .pos-cart-items tbody td:nth-child(4){
    text-align: center;
}
.pos-cart-items thead th:nth-child(5), .pos-cart-items tbody td:nth-child(5){
    text-align: right;
}
.pos-cart-items tbody td {
    padding: 10px 5px;
}
.pos-cart-items tbody td:first-child {
    padding-left: 10px;
}
.pos-cart-items tbody td:last-child {
    padding-right: 10px;
}
.pos-cart-items .cart-inline-actions button {
    border: none;
    background: none;
    padding: 0px;
}
.pos-cart-items .cart-inline-actions button i {
    width: 16px;
}
.pos-cart-items tbody .common-input {
    border: none;
    text-align: center;
    border-radius: 2px;
}
.pos-cart-items tbody .common-input:focus, .pos-cart-items tbody .common-input:hover {
    outline: none;
    border-color: #7367f0;
    box-shadow: 0 0 0 0.1rem rgba(115, 103, 240, 0.25);
}
.pos-cart-items tbody .item-qty {
    width: 60px;
}
.pos-cart-items tbody .unit-price {
    width: 80px;
}
.pos-cart-items tbody .item-discount {
    width: 80px;
}
.total-with-action {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 10px;
}
.total-with-action .item-total {
    line-height: 21px;
}
.tax-summary-row .pos-summary-label{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.tax-summary-row .tax-view-icon {
    line-height: 10px;
    cursor: pointer;
}
.tax-summary-row .tax-view-btn {
    font-size: 20px;
}


/* POS Item Info Modal CSS */
.item-info-image {
    max-height: 200px;
    max-width: 200px;
    border: 1px dashed;
    padding: 10px;
}
.item-edit-icon {
    cursor: pointer;
}


/* POS Payment Modal CSS */
.payment_modal_wrapper {
    display: flex;
    gap: 10px;
    height: 100%;
    max-height: 75vh;
}
.payment-methods-sidebar {
    width: 230px;
    flex-shrink: 0;
}
.payment-details-section-wrapper {
    flex-grow: 1;
}
.payment-details-section {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1rem;
}
.payment-details-section.single-column {
    grid-template-columns: 1fr;
}
.denomination-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-height: 152px;
    overflow-y: auto;
}


/* POS Payment Modal Styles */
.payment-methods-sidebar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}
.payment-methods-list {
    height: calc(100vh - 360px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.payment-methods-sidebar h6 {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}
.payment-methods-list, .payment-methods-list button {
    margin-bottom: 10px;
}
.payment-method-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.2s;
    text-align: left;
}
.payment-method-btn:hover {
    transform: translateX(3px);
}
.payment-method-btn:active {
    transform: translateX(0);
}
.payment-details-section {
    padding: 0 10px;
}
.denomination-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}
.denomination-section h6 {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}
.denomination-input {
    text-align: center;
    font-weight: 500;
}
.payment-summary-section {
    margin-top: 20px;
}
.payment-summary-section h6 {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}
.payment-summary-section .table {
    margin-bottom: 0;
}
.payment-summary-section .table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}
.payment-summary-section .table tfoot th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-top: 2px solid #dee2e6;
}
#payment-remaining-amount.text-success {
    color: #198754 !important;
}
#payment-remaining-amount.text-danger {
    color: #dc3545 !important;
}
#payment-remaining-amount.text-warning {
    color: #ffc107 !important;
}
.remove-payment-btn {
    padding: 4px 8px;
    border: none;
    background: transparent;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.2s;
}
.remove-payment-btn:hover {
    background-color: #f8d7da;
    border-radius: 4px;
}
#pos-payment-total {
    font-size: 1.75rem;
    font-weight: 700;
}
/* Payment modal table css */
.payment-modal-table-wrapper {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}
.payment-modal-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
}
.payment-modal-table-wrapper table thead th,
.payment-modal-table-wrapper table tbody td,
.payment-modal-table-wrapper table tfoot th {
    padding: 10px;
}
.payment-modal-table-wrapper table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
}
.payment-modal-table-wrapper table thead th:first-child {
    border-top-left-radius: 8px;
}
.payment-modal-table-wrapper table thead th:last-child {
    border-top-right-radius: 8px;
}
.payment-modal-table-wrapper table tfoot th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.payment-methods-list .btn:hover {
    border-color: #7367f0;
}

/* Responsive */


