
/* --- Manual Order Search Dropdown --- */
#product-results-dropdown {
    z-index: 1050;
    max-height: 200px;
    overflow-y: auto;
}

/* --- Cart Table Layout --- */
#cart-table {
    width: 100%;
    table-layout: fixed;
}

#cart-table thead {
    letter-spacing: 0.3px;
}

/* Column Widths */
#cart-table th.col-qty { width: 45px; }
#cart-table th.col-vat { width: 50px; }
#cart-table th.col-price { width: 80px; }

/* Remove number input spinners */
#cart-table input[type=number]::-webkit-outer-spin-button,
#cart-table input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#cart-table input[type=number] {
    -moz-appearance: textfield;
}

/* Compact Table Formatting */
#cart-table th {
    padding: 4px 2px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    vertical-align: middle !important;
}
#cart-table td {
    padding: 3px 2px !important;
    font-size: 11px !important;
}
#cart-table .form-control-sm {
    padding: 2px 4px !important;
    font-size: 11px !important;
    height: 26px !important;
}

/* 1. Force white background on disabled/autofilled inputs */
#manual-order-form input:disabled, 
#manual-order-form select:disabled,
#manual-order-form input:-webkit-autofill,
#manual-order-form input:-webkit-autofill:hover, 
#manual-order-form input:-webkit-autofill:focus,
#manual-order-form input:-webkit-autofill:active {
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
    -webkit-text-fill-color: #495057 !important;
    color: #495057 !important;
    border: 1px solid #ced4da !important;
    opacity: 1 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Order Editor

/* Products table */

#cart-table {
    table-layout: fixed;
    width: 100%;
}

#cart-table th,
#cart-table td {
    vertical-align: middle;
    padding: .7rem .6rem;
}

#cart-table thead th {
    background: #f8f9fa;
    color: #495057;
    font-size: .82rem;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

/* Column widths */

#cart-table th:nth-child(1),
#cart-table td:nth-child(1) {
    width: 26%;
}

#cart-table th:nth-child(2),
#cart-table td:nth-child(2) {
    width: 11%;
}

#cart-table th:nth-child(3),
#cart-table td:nth-child(3) {
    width: 8%;
    text-align: center;
}

#cart-table th:nth-child(4),
#cart-table td:nth-child(4) {
    width: 8%;
    text-align: center;
}

#cart-table th:nth-child(5),
#cart-table td:nth-child(5),
#cart-table th:nth-child(6),
#cart-table td:nth-child(6),
#cart-table th:nth-child(7),
#cart-table td:nth-child(7),
#cart-table th:nth-child(8),
#cart-table td:nth-child(8) {
    width: 11%;
    text-align: right;
}

#cart-table th:nth-child(9),
#cart-table td:nth-child(9) {
    width: 6%;
    text-align: center;
}
/* ==========================================================================
   Manual Order Add/Edit shared visual treatment
   ========================================================================== */
.manual-order-page {
    padding: 1rem;
}

.manual-order-page-heading {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: .85rem;
}

.manual-order-page-heading h1 {
    color: #343a40;
}

.manual-order-search-card,
.manual-order-page .card {
    border-color: #dee2e6;
}

.manual-order-search-card .card-body {
    background: #fff;
}

.manual-order-edit-hint {
    min-height: 38px;
    display: flex;
    align-items: center;
}

.manual-order-page .card-header h6 {
    letter-spacing: .01em;
}

.manual-order-page #customer-action-buttons .btn {
    font-size: .75rem;
}

.manual-order-page #selected-customer-details {
    background-color: #f8f9fa !important;
}

.manual-order-page .manual-order-delivery-toggle {
    border-top: 1px solid #dee2e6;
    padding-top: .85rem;
}

.manual-order-page .manual-order-delivery-panel {
    margin-top: .5rem;
    padding: 0 .25rem .25rem;
}

.manual-order-page .manual-order-dropdown {
    z-index: 1050;
    max-height: 250px;
    overflow-y: auto;
}

.manual-order-page #cart-table {
    table-layout: fixed;
    width: 100%;
}

.manual-order-page #cart-table thead th {
    background: #f8f9fa;
    color: #6c757d;
    font-size: .72rem !important;
    font-weight: 700;
    line-height: 1.15 !important;
    padding: .55rem .35rem !important;
    vertical-align: middle;
}

.manual-order-page #cart-table tbody td {
    font-size: .78rem !important;
    padding: .4rem .3rem !important;
    vertical-align: middle;
}

.manual-order-page #cart-table th:nth-child(1),
.manual-order-page #cart-table td:nth-child(1) { width: 28%; }
.manual-order-page #cart-table th:nth-child(2),
.manual-order-page #cart-table td:nth-child(2) { width: 8%; }
.manual-order-page #cart-table th:nth-child(3),
.manual-order-page #cart-table td:nth-child(3) { width: 8%; }
.manual-order-page #cart-table th:nth-child(4),
.manual-order-page #cart-table td:nth-child(4),
.manual-order-page #cart-table th:nth-child(5),
.manual-order-page #cart-table td:nth-child(5),
.manual-order-page #cart-table th:nth-child(6),
.manual-order-page #cart-table td:nth-child(6),
.manual-order-page #cart-table th:nth-child(7),
.manual-order-page #cart-table td:nth-child(7) { width: 12%; }
.manual-order-page #cart-table th:nth-child(8),
.manual-order-page #cart-table td:nth-child(8) { width: 6%; }

.manual-order-page .manual-order-totals table td {
    vertical-align: middle;
}

.manual-order-page .manual-order-totals table td:last-child {
    width: 48%;
}

@media (max-width: 991.98px) {
    .manual-order-page {
        padding: .5rem;
    }

    .manual-order-page .manual-order-products-card {
        height: auto !important;
    }
}


/* Order Status History */
.manual-order-page .manual-order-status-history {
    border-color: #dee2e6;
}

.manual-order-page .manual-order-status-history .card-header .btn-link {
    color: inherit;
    box-shadow: none;
}

.manual-order-page .manual-order-status-history .manual-order-history-chevron {
    transition: transform .2s ease;
}

.manual-order-page .manual-order-status-history .card-header .btn-link:not(.collapsed) .manual-order-history-chevron {
    transform: rotate(180deg);
}

.manual-order-page #order-status-history-table {
    table-layout: fixed;
    width: 100%;
}

.manual-order-page #order-status-history-table th,
.manual-order-page #order-status-history-table td {
    padding: .42rem .5rem;
    font-size: .75rem;
    vertical-align: top;
}

.manual-order-page #order-status-history-table th {
    background: #f8f9fa;
    color: #6c757d;
    font-weight: 700;
}

.manual-order-page #order-status-history-table th:nth-child(1),
.manual-order-page #order-status-history-table td:nth-child(1) { width: 25%; }
.manual-order-page #order-status-history-table th:nth-child(2),
.manual-order-page #order-status-history-table td:nth-child(2) { width: 20%; }
.manual-order-page #order-status-history-table th:nth-child(3),
.manual-order-page #order-status-history-table td:nth-child(3) {
    width: 45%;
    white-space: normal;
    overflow-wrap: anywhere;
}
.manual-order-page #order-status-history-table th:nth-child(4),
.manual-order-page #order-status-history-table td:nth-child(4) { width: 10%; }

/* ==========================================================================
   EASY PRODUCT MANAGER - START
   ========================================================================== */

/* Compact page heading and action area */
.epm-page-header {
    padding-top: .15rem;
}

.epm-page-title {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.65rem);
    font-weight: 300;
    line-height: 1.05;
}

.epm-page-subtitle {
    margin-top: .2rem;
    font-size: .95rem;
    line-height: 1.3;
}

.epm-page-actions .btn {
    padding: .45rem .8rem;
}

.epm-mode-header {
    padding-top: .15rem;
}

.epm-mode-title {
    margin: 0;
    font-size: 1.5rem !important;
    font-weight: 400;
    line-height: 1.2;
}

.epm-mode-heading .text-muted {
    margin-top: .15rem;
    font-size: .85rem;
}

.epm-save-button {
    padding: .5rem .85rem;
    font-size: 1rem;
}

@media (max-width: 767.98px) {
    .epm-page-title {
        font-size: 2rem;
    }

    .epm-page-actions,
    .epm-page-actions .btn,
    .epm-save-button {
        width: 100%;
    }

    .epm-page-actions .btn,
    .epm-save-button {
        justify-content: center;
    }
}

/* ==========================================================================
   EASY PRODUCT MANAGER - END
   ========================================================================== */
   
.cm-in-category-listing img,
.cm-ip-product-listing img {
  display: block;
  width: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  margin-left: auto;
  margin-right: auto;
}

.cm-in-category-listing img {
  height: 250px;
}

.cm-ip-product-listing img {
  height: 220px;
}

/* Move carousel arrows closer to the outer edges */
.carousel .carousel-control-prev,
.carousel .carousel-control-next {
  width: 44px;
}