/* ============================================================
 * Hold-visibility overlay for the Shagun PWA  (v1.0.48)
 * ============================================================
 * Visual design 12-Jun-2026:
 *  - The pill on the card is ONE compact line with the orange
 *    warning icon, qty-first wording, and a chevron.
 *  - Tapping the pill opens a FULL MODAL whose structure
 *    mirrors the existing product-detail popup (28px radius,
 *    400px max-width, 24px padding, brand-dark title) — but in
 *    warning colors. Pixel-consistent with the rest of the app.
 * ============================================================ */

/* ----- Inline pill on the product card ----- */
.hold-pill {
  background: #fff7ed;
  border: 1.5px solid #fb923c;
  border-radius: 12px;
  padding: 9px 11px;
  margin: 0 0 12px 0;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 0 rgba(251, 146, 60, 0.06);
  transition: background 0.15s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
}
.hold-pill:hover { background: #ffedd5; }
.hold-pill:active { background: #fed7aa; }

.hold-pill-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f97316;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.hold-pill-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  color: #9a3412;
  letter-spacing: -0.005em;
  line-height: 1.25;
  text-align: left;
}
.hold-pill-caret {
  flex: 0 0 auto;
  font-size: 13px;
  opacity: 0.7;
  color: #9a3412;
  font-weight: 700;
}

/* ----- Hold modal — mirrors .detail-card / #detail-modal style ----- */
.hold-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.hold-modal-overlay.show { display: flex; }

.hold-modal-card {
  background: #fff;
  max-width: 400px;
  width: 100%;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  font-family: inherit;
  max-height: 90vh;
  overflow-y: auto;
}

.hold-modal-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--brand-dark, #0f172a);
  margin-bottom: 4px;
  text-align: center;
  letter-spacing: -0.5px;
}
.hold-modal-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #64748b);
  margin-bottom: 20px;
  text-align: center;
}

/* Headline block — orange variant of the detail popup's blue section */
.hold-modal-headline {
  background: #fff7ed;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid #fed7aa;
  display: flex;
  align-items: center;
  gap: 11px;
}
.hold-modal-headline-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #f97316;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hold-modal-headline-text {
  flex: 1;
  font-size: 13.5px;
  font-weight: 800;
  color: #9a3412;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

/* Section label (matches the "1. PER UNIT PRICING" eyebrow) */
.hold-modal-section-label {
  font-size: 10px;
  font-weight: 800;
  color: #c2410c;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  text-transform: uppercase;
  padding-left: 2px;
}

/* Orders block */
.hold-modal-orders {
  background: #fff7ed;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid #fed7aa;
}
.hold-modal-order-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px dashed #fdba74;
  font-size: 13px;
}
.hold-modal-order-row:last-child { border-bottom: none; }
.hold-modal-order-party {
  font-weight: 700;
  color: #7c2d12;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hold-modal-order-party.is-you { color: #1d4ed8; }
.hold-modal-order-party.is-you::after {
  content: " (you)";
  font-weight: 500;
  opacity: 0.75;
  font-size: 11px;
}
.hold-modal-order-qty {
  font-weight: 800;
  color: #9a3412;
  font-variant-numeric: tabular-nums;
}
.hold-modal-order-po {
  font-size: 11px;
  color: #9a3412;
  opacity: 0.7;
}

.hold-modal-foot {
  text-align: center;
  font-size: 11.5px;
  color: #475569;
  padding: 0 6px 16px;
  font-style: italic;
  line-height: 1.45;
}
.hold-modal-foot strong { color: #0f172a; font-style: normal; font-weight: 800; }

.hold-modal-close-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.2px;
}
.hold-modal-close-btn:hover { background: #1e293b; }

/* ----- Cart row warning (kept from v1.0.47.2) ----- */
.cart-hold-warning {
  display: block;
  margin: 4px 0 0 0;
  padding: 6px 9px;
  background: #fff7ed;
  border-left: 3px solid #f97316;
  border-radius: 4px;
  color: #9a3412;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

/* ----- Hold status banner (only shown if Apps Script down) ----- */
.hold-status-banner {
  display: none;
  padding: 6px 12px;
  background: #fef9c3;
  color: #713f12;
  font-size: 11px;
  text-align: center;
  border-bottom: 1px solid #fde68a;
}
.hold-status-banner.show { display: block; }

/* ----- Overlap sheet at commit (kept; orange palette) ----- */
.overlap-sheet {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9100;
  padding: 16px;
}
.overlap-sheet.hidden { display: none; }
.overlap-sheet-card {
  background: #fff; border-radius: 28px; max-width: 560px; width: 100%;
  max-height: 92vh; overflow-y: auto; padding: 22px 22px 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35); font-family: inherit;
}
.overlap-eyebrow {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.5px;
  background: #fed7aa; color: #9a3412; margin-bottom: 10px;
}
.overlap-title { font-size: 17px; font-weight: 800; color: #0f172a; margin: 0 0 4px; }
.overlap-subtitle { font-size: 12px; color: #475569; margin: 0 0 16px; }
.overlap-item-block {
  margin: 12px 0; padding: 12px;
  border: 1.5px solid #fed7aa; border-radius: 12px; background: #fff7ed;
}
.overlap-item-block.out-of-stock { border-color: #f87171; background: #fef2f2; }
.overlap-item-name { font-weight: 800; font-size: 13.5px; color: #0f172a; margin-bottom: 4px; }
.overlap-item-meta {
  font-size: 11.5px; color: #475569;
  display: grid; grid-template-columns: auto 1fr; gap: 2px 8px;
  margin-bottom: 6px;
}
.overlap-item-meta span:nth-child(odd) { color: #64748b; }
.overlap-item-meta span:nth-child(even) { font-weight: 700; color: #1e293b; }
.overlap-item-holds {
  font-size: 11px; color: #7c2d12; margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed #fdba74;
}
.overlap-hold-row { display: flex; justify-content: space-between; padding: 2px 0; }
.overlap-hold-row .you-tag { font-weight: 700; color: #1d4ed8; }
.overlap-out-warning {
  margin-top: 6px; padding: 5px 8px; background: #fee2e2; color: #991b1b;
  border-radius: 5px; font-size: 11px; font-weight: 700;
}
.overlap-disclaimer {
  margin: 14px 0; padding: 10px 12px; background: #eef2ff;
  border-left: 3px solid #6366f1; border-radius: 4px;
  font-size: 11.5px; color: #312e81; line-height: 1.45;
}
.overlap-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  padding-top: 8px; border-top: 1px solid #e2e8f0;
}
.overlap-actions button {
  padding: 10px 18px; font-size: 13px; border-radius: 12px;
  border: 1px solid #cbd5e1; background: #fff; color: #0f172a;
  cursor: pointer; font-weight: 700;
}
.overlap-actions button.primary {
  background: #0f172a; color: #fff; border-color: #0f172a;
}
.overlap-actions button.primary:hover { background: #1e293b; }
