/* ═══════════════════════════════════════════════════════════════════
   WP COURIER BOOKING — Booking Details Page CSS
   Matches the full booking confirmation form (step 2)
═══════════════════════════════════════════════════════════════════ */

/* ── Booking Page Wrapper ─────────────────────────────────────────── */
.wpcb-booking-page {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f1117;
  background: #f4f6f9;
  min-height: 100vh;
  padding: 0 0 40px;
  max-width: 1310px;
  padding: 2vw 5vw;
}

/* ── Booking Header ───────────────────────────────────────────────── */
.wpcb-booking-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e8ee;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.wpcb-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f4f6f9;
  border: 1.5px solid #e5e8ee;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
  white-space: nowrap;
}
.wpcb-back-btn:hover { background: #e5e8ee; color: #0f1117; }
.wpcb-booking-header-title { flex: 1; }
.wpcb-booking-header-title h2 {
  font-size: 17px;
  font-weight: 700;
  color: #0f1117;
  margin-bottom: 2px;
}
.wpcb-booking-header-title p {
  font-size: 12px;
  color: #9ca3af;
}
.wpcb-booking-header-price {
  text-align: right;
  flex-shrink: 0;
}
.wpcb-header-price-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9ca3af;
}
.wpcb-header-price-amount {
  font-size: 26px;
  font-weight: 800;
  color: #16a34a;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.wpcb-header-price-sub {
  font-size: 10px;
  color: #9ca3af;
}

/* ── Body / Layout ────────────────────────────────────────────────── */
.wpcb-booking-body {
  padding: 24px 0px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wpcb-booking-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Cards ────────────────────────────────────────────────────────── */
.wpcb-booking-card {
  background: #ffffff;
  border: 1px solid #e5e8ee;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.wpcb-card-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 700;
  color: #0f1117;
  background: #f8f9fb;
  border-bottom: 1px solid #e5e8ee;
  letter-spacing: 0.01em;
}
.wpcb-card-heading svg { color: #e23636; }
.wpcb-card-body { padding: 18px 20px; }

/* ── Form Grid ────────────────────────────────────────────────────── */
.wpcb-form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.wpcb-form-row-2col:last-child { margin-bottom: 0; }

/* ── Field Groups ─────────────────────────────────────────────────── */
.wpcb-field-group { display: flex; flex-direction: column; }
.wpcb-field-group.wpcb-field-stretch { flex: 1; }
.wpcb-field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: 5px;
}
.wpcb-req { color: #e23636; }

/* ── Inputs ───────────────────────────────────────────────────────── */
.wpcb-input,
.wpcb-select,
.wpcb-textarea {
  padding: 9px 12px;
  border: 1.5px solid #e5e8ee;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: #0f1117;
  background: #ffffff;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
  box-sizing: border-box;
}
.wpcb-input:focus,
.wpcb-select:focus,
.wpcb-textarea:focus {
  border-color: #e23636;
  box-shadow: 0 0 0 3px rgba(226,54,54,0.08);
}
.wpcb-input.wpcb-readonly,
.wpcb-input[readonly]:not(#wpcb-b-collect-time):not(#wpcb-b-delivery-time) {
  background: #f8f9fb;
  color: #6b7280;
  cursor: default;
}
.wpcb-textarea {
  resize: vertical;
  line-height: 1.5;
}
.wpcb-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%239ca3af'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}
.wpcb-input-sm { width: 70px; text-align: center; }

/* ── Service Info Grid ────────────────────────────────────────────── */
.wpcb-service-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1.5px solid #e5e8ee;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 4px;
}
.wpcb-service-info-item {
  padding: 10px 14px;
  border-bottom: 1px solid #e5e8ee;
  border-right: 1px solid #e5e8ee;
}
.wpcb-service-info-item:nth-child(even) { border-right: none; }
.wpcb-service-info-item:nth-last-child(-n+2) { border-bottom: none; }
.wpcb-service-info-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 3px;
}
.wpcb-service-info-value {
  font-size: 12px;
  font-weight: 600;
  color: #0f1117;
}

/* ── Time + Amend Row ─────────────────────────────────────────────── */
.wpcb-time-amend-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 6px;
}
.wpcb-amend-btn {
  padding: 9px 20px;
  background: transparent;
  border: 1.5px solid #e23636;
  border-radius: 8px;
  color: #e23636;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
  flex-shrink: 0;
}
.wpcb-amend-btn:hover { background: #e23636; color: #fff; }
.wpcb-time-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 14px;
  font-style: italic;
}
.wpcb-or-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 10px;
  font-style: italic;
}

/* ── Consignment Table ────────────────────────────────────────────── */
.wpcb-consignment-hint {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 14px;
}
.wpcb-consignment-table-wrap {
  overflow-x: auto;
  border: 1.5px solid #e5e8ee;
  border-radius: 8px;
  margin-bottom: 12px;
}
.wpcb-consignment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.wpcb-consignment-table th {
  padding: 10px 10px;
  background: #f8f9fb;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  border-bottom: 1.5px solid #e5e8ee;
  white-space: nowrap;
  text-align: left;
}
.wpcb-consignment-table td {
  padding: 8px 8px;
  border-bottom: 1px solid #f1f3f6;
  vertical-align: middle;
}
.wpcb-consignment-table tr:last-child td { border-bottom: none; }
.wpcb-col-desc { width: 35%; }
.wpcb-weight-input {
  display: flex;
  align-items: center;
  gap: 4px;
}
.wpcb-unit {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 600;
  flex-shrink: 0;
}
.wpcb-remove-row {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
}
.wpcb-remove-row:hover { color: #e23636; background: #fef2f2; }

/* ── Add Row Button ───────────────────────────────────────────────── */
.wpcb-add-row-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f8f9fb;
  border: 1.5px solid #e5e8ee;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
  margin-bottom: 16px;
}
.wpcb-add-row-btn:hover { border-color: #e23636; color: #e23636; background: #fff0f0; }

/* ── Goods Value Row ──────────────────────────────────────────────── */
.wpcb-goods-value-row {
  border-top: 1px solid #f1f3f6;
  padding-top: 14px;
}

/* ── Summary Card ─────────────────────────────────────────────────── */
.wpcb-summary-card .wpcb-card-heading svg { color: #2563eb; }
.wpcb-summary-grid {
  border: 1.5px solid #e5e8ee;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}
.wpcb-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid #f1f3f6;
}
.wpcb-summary-row:last-child { border-bottom: none; }
.wpcb-summary-total {
  background: #f8f9fb;
  font-weight: 700;
}
.wpcb-summary-label { font-size: 13px; color: #6b7280; }
.wpcb-summary-value { font-size: 13px; font-weight: 600; color: #0f1117; }
.wpcb-price-highlight { color: #16a34a !important; font-size: 15px !important; font-weight: 700 !important; }
.wpcb-summary-total .wpcb-summary-label,
.wpcb-summary-total .wpcb-summary-value { font-size: 15px; }

/* ── T&C Checkbox ─────────────────────────────────────────────────── */
.wpcb-tc-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
  margin-bottom: 16px;
  line-height: 1.5;
}
.wpcb-tc-checkbox {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #e23636;
  cursor: pointer;
}
.wpcb-tc-link { color: #e23636; font-weight: 600; text-decoration: none; }
.wpcb-tc-link:hover { text-decoration: underline; }

/* ── Submit Button ────────────────────────────────────────────────── */
.wpcb-btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(29,78,216,0.3);
  letter-spacing: 0.01em;
}
.wpcb-btn-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  box-shadow: 0 4px 20px rgba(29,78,216,0.4);
  transform: translateY(-1px);
}
.wpcb-btn-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ── Error ────────────────────────────────────────────────────────── */
.wpcb-booking-page .wpcb-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  margin-bottom: 12px;
  display: none;
}

/* ── Success Screen ───────────────────────────────────────────────── */
.wpcb-booking-success {
  max-width: 520px;
  margin: 60px auto;
  text-align: center;
  padding: 40px 32px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e8ee;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.wpcb-success-animation { margin-bottom: 20px; }
.wpcb-success-circle {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: #fff;
  box-shadow: 0 4px 20px rgba(22,163,74,0.35);
  animation: wpcb-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes wpcb-pop {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.wpcb-booking-success h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0f1117;
  margin-bottom: 8px;
}
.wpcb-booking-success > p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 20px;
}
.wpcb-success-ref-box {
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  border-radius: 10px;
  padding: 16px 24px;
  margin: 0 auto 20px;
  display: inline-block;
  min-width: 220px;
}
.wpcb-success-ref-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #16a34a;
  margin-bottom: 6px;
}
.wpcb-success-ref {
  font-size: 28px;
  font-weight: 800;
  color: #14532d;
  letter-spacing: 2px;
  font-family: 'DM Mono', monospace;
}
.wpcb-success-email-note {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 24px;
}
.wpcb-btn-new-booking {
  padding: 13px 28px;
  background: #e23636;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.wpcb-btn-new-booking:hover { background: #c42020; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .wpcb-booking-row-2col { grid-template-columns: 1fr; }
  .wpcb-booking-header { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .wpcb-booking-body { padding: 16px 12px; }
}
@media (max-width: 600px) {
  .wpcb-form-row-2col { grid-template-columns: 1fr; }
  .wpcb-card-body { padding: 14px; }
  .wpcb-booking-header-price { display: none; }
  .wpcb-consignment-table { font-size: 11px; }
  .wpcb-input-sm { width: 55px; }
}