/* =====================================================
   CART WRAPPER
===================================================== */

.pointless-pos-cart {
  border: 1px solid #e0e0e0;
  padding: 16px;
  max-width: 720px;
  background: #ffffff;
}

/* Loading state handled earlier */
.pointless-pos-cart--loading {
  opacity: 0.6;
  pointer-events: none;
}

/* =====================================================
   CART ITEMS
===================================================== */

.pointless-pos-cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pointless-pos-cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.pointless-pos-cart-item:last-child {
  border-bottom: none;
}

/* =====================================================
   ITEM CONTENT
===================================================== */

.pointless-pos-cart-item-name {
  font-weight: 500;
}

.pointless-pos-cart-item-quantity input.pointless-pos-cart-qty-input {
  width: 64px;
  padding: 4px 6px;
}

.pointless-pos-cart-item-price {
  text-align: right;
  white-space: nowrap;
}

/* =====================================================
   ITEM ACTIONS
===================================================== */

.pointless-pos-cart-item-actions {
  text-align: right;
}

.pointless-pos-cart-remove {
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
  padding: 4px 6px;
}

.pointless-pos-cart-remove:hover {
  text-decoration: underline;
}

/* =====================================================
   TOTALS
===================================================== */

.pointless-pos-cart-totals {
  margin-top: 16px;
  border-top: 2px solid #e0e0e0;
  padding-top: 12px;
}

.pointless-pos-cart-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.pointless-pos-cart-total {
  font-size: 1.1em;
}

/* =====================================================
   CHECKOUT
===================================================== */

.pointless-pos-cart-checkout {
  margin-top: 20px;
  text-align: right;
}

.pointless-pos-cart-checkout-button {
  display: inline-block;
  padding: 10px 18px;
  background: #1976d2;
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
}

.pointless-pos-cart-checkout-button:hover {
  background: #125aa3;
}

/* =====================================================
   EMPTY STATE
===================================================== */

.pointless-pos-cart-empty {
  padding: 16px;
  text-align: center;
  color: #666666;
}


/* =====================================================
   Loading
===================================================== */

.pointless-pos-cart--loading {
  opacity: 0.6;
  pointer-events: none;
}

.pointless-pos-cart--loading::after {
  content: 'Updating cart…';
  display: block;
  margin-top: 12px;
  font-size: 14px;
}

/* =====================================================
   ERROR BANNER
===================================================== */

.pointless-pos-cart-errors {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #611a15;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 4px;
  font-size: 14px;
}

.pointless-pos-cart-errors button {
  background: none;
  border: none;
  float: right;
  font-size: 16px;
  cursor: pointer;
  color: inherit;
}

/* =====================================================
   Cart Indicator
===================================================== */


.pointless-pos-cart-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pointless-pos-cart-count {
  font-size: 12px;
  min-width: 16px;
  text-align: center;
}


/* =====================================================
   Cart Toast
===================================================== */

.pointless-pos-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -10px);
  background: #222;
  color: #fff;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 99999;
}

.pointless-pos-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
