/* ═══════════════════════════════════════════════════════════════════════════
   FIB DATABASE - CASE CHARGES CART
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Cart Container ─── */
.cart {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--fib-gold);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

/* ─── Cart Header ─── */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.cart-empty-msg {
  color: var(--text-muted);
  font-size: 13px;
  padding: var(--space-md);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  text-align: center;
}

/* ─── Cart Items ─── */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: var(--space-md);
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  transition: all var(--transition-fast);
}

.cart-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--fib-gold-border);
}

.cart-item-name {
  font-weight: 600;
  color: white;
  font-size: 13px;
}

.cart-item-severity {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 8px;
}

.cart-item-meta {
  display: flex;
  gap: var(--space-sm);
}

.cart-pill {
  font-size: 11px;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--text-secondary);
}

/* ─── Quantity Controls ─── */
.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.cart-qty button {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: white;
  border: 1px solid var(--border-default);
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty button:hover {
  background: var(--fib-gold-bg);
  border-color: var(--fib-gold);
  color: var(--fib-gold);
}

.cart-qty input {
  width: 48px;
  background: var(--bg-primary);
  color: white;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-xs);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.cart-qty input:focus {
  border-color: var(--fib-gold);
  outline: none;
}

.cart-remove {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.1);
  color: var(--status-danger);
  border: 1px solid var(--status-danger-border);
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-remove:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ─── Totals ─── */
.cart-totals {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.cart-total-pill {
  font-size: 12px;
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: white;
}

.cart-total-pill.highlight {
  background: var(--fib-gold-bg);
  border-color: var(--fib-gold);
  color: var(--fib-gold);
}

/* ─── Sliders ─── */
.cart-sliders {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}

.slider-group {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.slider-group:last-child {
  margin-bottom: 0;
}

.slider-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 130px;
}

.slider-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.slider {
  flex: 1;
  height: 6px;
  background: var(--border-default);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--status-info);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--status-info);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
}

.slider-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--fib-gold);
  min-width: 60px;
  text-align: right;
  font-family: var(--font-mono);
}

/* ─── Notes Section ─── */
.cart-notes {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px dashed var(--border-default);
}

.cart-notes h3 {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 var(--space-sm);
}

.cart-note-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.cart-note-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: #cfe3ff;
  font-size: 11px;
}

.cart-note-chip button {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 900;
  font-size: 10px;
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.4);
  transition: all var(--transition-fast);
}

.cart-note-chip button:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* ─── Cart Actions ─── */
.cart-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  margin-top: var(--space-md);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .cart-row {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  
  .cart-item-meta {
    justify-content: flex-start;
  }
  
  .cart-qty {
    justify-content: center;
  }
  
  .slider-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .slider-label {
    min-width: auto;
  }
  
  .cart-totals {
    flex-direction: column;
  }
}

