/* pos.css - POS page specific styles */

/* Product cards */
.product-card {
  cursor: pointer;
  transition: transform 0.2s;
}

.product-card:hover {
  transform: scale(1.05);
}

.product-card img {
  height: 120px;
  object-fit: cover;
}

/* Cart / Invoice area */
.invoice-box {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  color: #000;
}

.invoice-header {
  text-align: center;
  border-bottom: 2px solid #000;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.invoice-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
}

.info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.info-label {
  font-weight: bold;
  width: 45%;
}

.info-value {
  text-align: right;
  width: 55%;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.product-table th,
.product-table td {
  border-bottom: 1px dashed #000;
  padding: 4px 0;
  text-align: left;
}

.product-table .qty {
  text-align: center;
  width: 40px;
}

.product-table .price {
  text-align: right;
  width: 90px;
}

.totals-table {
  width: 100%;
  margin-top: 10px;
}

.totals-table td {
  padding: 4px 0;
}

.totals-table .label {
  font-weight: bold;
}

.totals-table .value {
  text-align: right;
}

.grand-total {
  font-size: 16px;
  border-top: 2px solid #000;
  padding-top: 8px;
  margin-top: 8px;
}

.thanks {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  font-style: italic;
}

/* General POS layout */
.total-box {
  font-size: 1.5rem;
  font-weight: bold;
}

/* POS Header Custom Color */
.card-header.bg-primary {
  background-color: #79b8b9 !important;
  color: #000000 !important;
}

/* Customer Bill Card */
.customer-bill-card {
  border-top: 3px solid #79b8b9;
}

/* Customer Bill Header */
.customer-bill-header {
  background-color: #79b8b9 !important;
  color: #000 !important;
  font-weight: bold;
}

/* Search input group */
.search-input-group {
  flex: 1;
}

/* Search hint text */
.search-hint {
  font-size: 0.82rem;
  text-align: center;
  color: #6c757d;
  margin-bottom: 1rem;
}

/* Product card styling */
.product-card {
  cursor: pointer;
  overflow: hidden;
}

.product-card-image {
  height: 110px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
}

.product-card-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.product-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
}

.product-card-title {
  height: 38px;
  font-size: 13px;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.product-sku,
.product-barcode {
  font-family: monospace;
  font-size: 0.78rem;
  display: block;
  margin-bottom: 0.25rem;
  color: #6c757d;
}

.product-price {
  font-size: 15px;
  color: #28a745;
  margin-bottom: 0.25rem;
  font-weight: bold;
}

/* Customer Bill Area */
.customer-bill {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  color: #000;
  background: #fff;
}

.customer-info {
  margin-bottom: 1rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5rem;
}

.bill-dashed-line {
  border-top: 1px dashed #000;
  margin: 6px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr 60px 90px 30px;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

.cart-item.low-stock {
  background-color: #ffe6e6;
  border-left: 3px solid #dc3545;
}

.cart-item-name {
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.4;
  font-size: 13px;
}

.cart-item-wrapper {
  min-width: 0;
  flex: 1;
}

.cart-item-warning {
  color: #dc3545;
  font-weight: bold;
  font-size: 11px;
  display: block;
  margin-top: 0.25rem;
}

.cart-item-qty {
  width: 60px;
}

.cart-item-qty input {
  width: 100%;
  text-align: center;
}

.cart-item-total {
  width: 90px;
  text-align: right;
  font-weight: bold;
  font-size: 14px;
  padding-top: 2px;
}

.cart-stock-warning {
  font-size: 12px;
  padding: 8px 10px;
  margin-bottom: 1rem;
}

.totals-section {
  margin-bottom: 1rem;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-top: 0.5rem;
}

.totals-row.subtotal {
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5rem;
}

.totals-row.tax {
  color: #666;
}

.totals-row.grand-total {
  border-top: 2px solid #17a2b8;
  padding-top: 0.5rem;
  font-size: 1.25rem;
}

.amount-paid-label {
  font-weight: 600;
  font-size: 13px;
}

.change-display {
  background-color: #f8f9fa;
  border: 2px solid #17a2b8;
  padding: 0.5rem;
  border-radius: 4px;
}

.totals-subtotal-label,
.totals-subtotal-value,
.totals-tax-label,
.totals-tax-value,
.totals-change-label,
.totals-change-value {
  font-size: 14px;
}

.totals-tax-label,
.totals-tax-value {
  font-size: 13px;
}