/* =====================================================
   OLADAY V3 — DIGITAL RECEIPT
   Lifted from public/assets/logistics/css/logistics.css so the printed
   slip is byte-for-byte the same document the live logistics page
   produces for a Pool Daily / Morning Express booking.

   Every rule is scoped under #receiptModal. The source file styles a
   generic .modal-overlay, which on V3 would collide with the booking
   deck — the scope is the only deliberate change.
   ===================================================== */

#receiptModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#receiptModal.open {
  opacity: 1;
  pointer-events: all;
}

#receiptModal .receipt-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#receiptModal.open .receipt-card-wrapper {
  transform: scale(1);
}

/* The paper receipt */
#receiptModal .digital-receipt {
  background: #fff;
  width: 320px;
  padding: 30px 20px;
  border-radius: 5px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  font-family: "Courier New", monospace;
  color: #333;
  position: relative;
}
#receiptModal .digital-receipt::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 100%;
  height: 10px;
  background:
    linear-gradient(135deg, #fff 5px, transparent 0) 0 5px,
    linear-gradient(-135deg, #fff 5px, transparent 0) 0 5px;
  background-color: transparent;
  background-size: 10px 10px;
}

#receiptModal .receipt-header {
  text-align: center;
  border-bottom: 2px dashed #333;
  padding-bottom: 15px;
  margin-bottom: 20px;
}
#receiptModal .receipt-header h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: #000;
  font-family: "Courier New", monospace;
}
#receiptModal .receipt-sub {
  font-size: 10px;
  letter-spacing: 1px;
}

#receiptModal .receipt-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  gap: 10px;
}
#receiptModal .receipt-value {
  font-weight: 700;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}
#receiptModal .receipt-divider {
  border-bottom: 1px dashed #ccc;
  margin: 15px 0;
}
#receiptModal .receipt-note {
  font-size: 11px;
  margin-bottom: 15px;
  line-height: 1.3;
}
#receiptModal .validation-msg {
  text-align: center;
  font-size: 11px;
  color: #d4af37;
  font-weight: 700;
  background: #111;
  padding: 5px;
  border-radius: 4px;
}
#receiptModal .receipt-footer {
  text-align: center;
  font-size: 10px;
  margin-top: 20px;
  color: #777;
}

/* Bank details block */
#receiptModal .bank-details-box {
  border-top: 2px dashed #333;
  border-bottom: 2px dashed #333;
  padding: 10px 0;
  margin: 15px 0;
  text-align: center;
  background: #f9f9f9;
}
#receiptModal .bank-title {
  font-weight: 800;
  margin-bottom: 5px;
  font-size: 12px;
  text-decoration: underline;
}
#receiptModal .bank-details-box p {
  margin: 2px 0;
  font-size: 12px;
  color: #000;
}

/* Actions */
#receiptModal .receipt-actions {
  display: flex;
  gap: 15px;
}
#receiptModal .btn-download {
  background: #d4af37;
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
}
#receiptModal .btn-close-receipt {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
}

/* Phone sizing — same breakpoint behaviour as the source */
@media (max-width: 760px) {
  #receiptModal .receipt-card-wrapper {
    gap: 12px;
    transform: scale(0.82);
  }
  #receiptModal.open .receipt-card-wrapper {
    transform: scale(0.82);
  }
  #receiptModal .digital-receipt {
    width: min(280px, calc(100vw - 44px));
    padding: 20px 15px;
  }
  #receiptModal .receipt-header {
    padding-bottom: 10px;
    margin-bottom: 13px;
  }
  #receiptModal .receipt-header h2 {
    font-size: 16px;
  }
  #receiptModal .receipt-sub {
    font-size: 9px;
  }
  #receiptModal .receipt-row {
    margin-bottom: 8px;
    font-size: 11px;
  }
  #receiptModal .receipt-divider {
    margin: 10px 0;
  }
  #receiptModal .receipt-note {
    font-size: 10px;
    margin-bottom: 10px;
  }
  #receiptModal .validation-msg {
    font-size: 10px;
  }
  #receiptModal .receipt-footer {
    font-size: 9px;
    margin-top: 12px;
  }
  #receiptModal .receipt-actions {
    gap: 10px;
  }
  #receiptModal .btn-download,
  #receiptModal .btn-close-receipt {
    padding: 8px 14px;
    font-size: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   BOOKING SLIP — printed-paper styling

   Deliberately NOT the app's card language. This is the one surface that
   should look like something printed at a counter, because that is what
   makes a screenshot of it read as proof rather than as a web page.
   ═══════════════════════════════════════════════════════════════════════ */

#receiptModal .digital-receipt {
  font-family: "Roboto Mono", "Courier New", ui-monospace, monospace;
  width: 360px;
  max-width: calc(100vw - 32px);
  margin: 0 auto;
  background: #fff;
  color: #000;
  border: 2px dashed #111;
  border-radius: 4px;
  padding: 22px 20px;
}

#receiptModal .receipt-header h2 {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  margin: 0;
}
#receiptModal .receipt-sub {
  margin: 6px 0 0;
  text-align: center;
  color: #6b6b6b;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

/* Thick rule under the masthead, thin ones between sections. */
#receiptModal .receipt-header { border-bottom: 3px dashed #111; padding-bottom: 12px; margin-bottom: 14px; }
#receiptModal .receipt-divider { border-top: 1px dashed #bdbdbd; margin: 14px 0; }

#receiptModal .receipt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 0.78rem;
}
#receiptModal .receipt-row > span:first-child { color: #444; letter-spacing: 0.04em; }
#receiptModal .receipt-value { font-weight: 700; text-align: right; overflow-wrap: anywhere; }

/* The pending notice. Neutral by design — a quote awaiting a callback is
   the normal outcome here, not an error, so nothing is red. */
#receiptModal .receipt-pending-box {
  border: 1px dashed #111;
  border-radius: 4px;
  padding: 12px;
  margin: 14px 0;
  text-align: center;
}
#receiptModal .receipt-pending-title {
  margin: 0 0 6px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
#receiptModal .receipt-pending-body {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #4a4a4a;
}

/* Authentication bar: black field, gold text, full bleed across the slip. */
#receiptModal .validation-msg {
  margin: 16px 0 10px;
  padding: 10px 8px;
  background: #111;
  color: #d4af37;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

#receiptModal .receipt-footer p {
  margin: 0;
  text-align: center;
  color: #6b6b6b;
  font-size: 0.68rem;
}

/* Actions sit below the slip, pill-shaped, and never print. */
#receiptModal .receipt-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
#receiptModal .receipt-actions button {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
#receiptModal .btn-download { background: #d97a1e; color: #fff; border: 0; }
#receiptModal .btn-close-receipt { background: #fff; color: #111; border: 1px solid #d8d2c8; }
