/* ========================================
   PICKUP EXPRESS - Booking Page Styles
   ======================================== */

/* ── Book Page Layout ── */
.book-page {
  min-height: 100vh; background: var(--gray-50);
  padding-top: 72px;
}
.book-header {
  background: var(--orange); color: var(--white);
  padding: 2.5rem 2rem; text-align: center;
}
.book-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.4rem; }
.book-header p { font-size: 1rem; color: rgba(255,255,255,0.65); }

/* ── Progress Bar ── */
.progress-wrap {
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  padding: 1.25rem 2rem; position: sticky; top: 72px; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.progress-steps {
  max-width: 800px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
}
.progress-steps::before {
  content: ''; position: absolute;
  top: 50%; left: 0; right: 0; height: 2px;
  background: var(--gray-200); z-index: 0; transform: translateY(-50%);
}
.progress-fill {
  position: absolute; top: 50%; left: 0; height: 2px;
  background: var(--orange); z-index: 1;
  transition: width 0.5s ease; transform: translateY(-50%);
}
.step-dot {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gray-200); color: var(--gray-400);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 700; position: relative; z-index: 2;
  transition: all 0.4s ease; flex-shrink: 0;
}
.step-dot.active { background: var(--orange); color: var(--white); }
.step-dot.done { background: #22C55E; color: var(--white); }
.step-dot.done::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.8rem; }
.step-dot.done span { display: none; }
.step-label {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  font-size: 0.7rem; white-space: nowrap; color: var(--gray-600); font-weight: 500;
}
.step-dot.active .step-label { color: var(--orange); font-weight: 700; }

/* ── Book Form Container ── */
.book-container {
  max-width: 860px; margin: 2.5rem auto; padding: 0 1.5rem 4rem;
}
.form-step { display: none; animation: stepIn 0.4s ease; }
.form-step.active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.step-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 2.5rem;
  border: 1px solid var(--gray-200);
}
.step-card-header {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem;
  padding-bottom: 1.5rem; border-bottom: 2px solid var(--gray-100);
}
.step-card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--orange-light); color: var(--orange);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.step-card-title h2 { font-size: 1.35rem; font-weight: 800; color: var(--navy); }
.step-card-title p { font-size: 0.875rem; color: var(--gray-600); }

/* ── Form Fields ── */
.form-row { display: grid; gap: 1.25rem; margin-bottom: 1.25rem; }
.form-row.two { grid-template-columns: 1fr 1fr; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.8rem; font-weight: 700; color: var(--navy);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-group label .req { color: var(--orange); }
.form-control {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: 'Poppins', sans-serif;
  color: var(--text); background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.form-control::placeholder { color: var(--gray-400); }
.form-control.error { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
.field-error { font-size: 0.78rem; color: #EF4444; margin-top: 2px; }
.form-level-error {
  display: none;
  font-size: 0.85rem;
  color: #EF4444;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
  text-align: center;
}
.form-level-error.show { display: block; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

/* Input with icon */
.input-wrap { position: relative; }
.input-wrap i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-size: 0.95rem; pointer-events: none;
}
.input-wrap .form-control { padding-left: 42px; }

/* ── Map Section ── */
.map-section { margin-top: 1.25rem; }
#map {
  height: 320px; border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--gray-200); margin-top: 0.5rem;
}
.map-info {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem;
  margin-top: 1rem;
}
.map-info-card {
  background: var(--gray-50); border-radius: var(--radius-sm);
  padding: 1rem; text-align: center;
  border: 1px solid var(--gray-200);
}
.map-info-card .map-info-icon { color: var(--orange); font-size: 1.1rem; margin-bottom: 4px; }
.map-info-card .map-info-val { font-size: 1.05rem; font-weight: 800; color: var(--navy); }
.map-info-card .map-info-label { font-size: 0.75rem; color: var(--gray-600); }
.address-suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 2000;
  background: var(--orange); border: 1px solid var(--orange-dark);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  max-height: 220px; overflow-y: auto;
}
.suggestion-item {
  padding: 10px 14px; font-size: 0.875rem; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.2); display: flex;
  align-items: flex-start; gap: 8px; color: var(--white);
  transition: background 0.15s;
}
.suggestion-item:hover { background: var(--orange-dark); color: var(--white); }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item i { color: var(--white); margin-top: 2px; flex-shrink: 0; }
.suggestion-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.suggestion-primary { font-weight: 600; }
.suggestion-secondary { font-size: 0.8rem; opacity: 0.8; }

/* ── Item Types ── */
.item-types-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 0.75rem;
  margin-top: 0.5rem;
}
.item-type-btn {
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 12px 8px; text-align: center; cursor: pointer;
  transition: var(--transition); background: var(--white);
  font-family: 'Poppins', sans-serif;
}
.item-type-btn i { display: block; font-size: 1.4rem; color: var(--gray-400); margin-bottom: 6px; transition: color 0.2s; }
.item-type-btn span { font-size: 0.75rem; color: var(--gray-600); font-weight: 500; }
.item-type-btn:hover { border-color: var(--orange); background: var(--orange-light); }
.item-type-btn.selected { border-color: var(--orange); background: var(--orange-light); }
.item-type-btn.selected i { color: var(--orange); }
.item-type-btn.selected span { color: var(--orange); font-weight: 700; }

/* Counter */
.counter-wrap {
  display: flex; align-items: center; gap: 0.75rem;
}
.counter-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--gray-200); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer; transition: var(--transition);
  font-family: inherit;
}
.counter-btn:hover { border-color: var(--orange); color: var(--orange); }
.counter-val {
  width: 60px; text-align: center; font-size: 1.2rem;
  font-weight: 800; color: var(--navy);
}

/* Stairs input */
.stairs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ── Photo Upload ── */
.photo-drop-zone {
  border: 2px dashed var(--gray-200); border-radius: var(--radius);
  padding: 2rem; text-align: center; cursor: pointer;
  transition: var(--transition); background: var(--gray-50);
}
.photo-drop-zone:hover, .photo-drop-zone.drag-over {
  border-color: var(--orange); background: var(--orange-light);
}
.photo-drop-zone i { font-size: 2.5rem; color: var(--gray-400); margin-bottom: 0.75rem; }
.photo-drop-zone p { color: var(--gray-600); font-size: 0.9rem; }
.photo-drop-zone span { font-size: 0.8rem; color: var(--gray-400); }
.photo-previews {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px,1fr));
  gap: 0.75rem; margin-top: 1rem;
}
.photo-preview {
  position: relative; border-radius: var(--radius-sm);
  overflow: hidden; aspect-ratio: 1;
  border: 2px solid var(--gray-200);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(239,68,68,0.9); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; cursor: pointer; font-family: 'Font Awesome 6 Free'; font-weight: 900;
}

/* ── Calendar ── */
.calendar-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.calendar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.cal-nav {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--gray-200); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); font-size: 0.9rem;
  font-family: inherit;
}
.cal-nav:hover { border-color: var(--orange); color: var(--orange); }
.cal-month-label { font-weight: 800; color: var(--navy); font-size: 1rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.cal-day-header {
  text-align: center; font-size: 0.7rem; font-weight: 700;
  color: var(--gray-400); padding: 6px 0; text-transform: uppercase;
}
.cal-day {
  aspect-ratio: 1; border-radius: 8px; display: flex;
  align-items: center; justify-content: center;
  font-size: 0.8rem; cursor: pointer; transition: var(--transition);
  font-weight: 500; position: relative;
}
.cal-day.empty { cursor: default; }
.cal-day.past { color: var(--gray-400); cursor: not-allowed; opacity: 0.5; }
.cal-day.today { border: 2px solid var(--orange); color: var(--orange); font-weight: 700; }
.cal-day.available:hover { background: var(--orange-light); color: var(--orange); }
.cal-day.selected { background: var(--orange); color: var(--white); font-weight: 700; }
.cal-day.partial::after {
  content: ''; position: absolute; bottom: 3px; left: 50%;
  transform: translateX(-50%); width: 4px; height: 4px;
  border-radius: 50%; background: #FBBF24;
}
.cal-day.full { color: var(--gray-400); cursor: not-allowed; text-decoration: line-through; }
.cal-legend {
  display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.75rem; font-size: 0.75rem; color: var(--gray-600);
}
.cal-legend-item { display: flex; align-items: center; gap: 5px; }
.cal-dot {
  width: 10px; height: 10px; border-radius: 50%;
}

/* Time Slots */
.slots-wrap { }
.slots-title { font-weight: 700; color: var(--navy); margin-bottom: 0.75rem; font-size: 0.875rem; }
.slots-date-chosen { color: var(--orange); font-size: 0.85rem; margin-bottom: 0.75rem; }
.slots-grid { display: flex; flex-direction: column; gap: 0.6rem; }
.time-slot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200); cursor: pointer;
  transition: var(--transition); background: var(--white);
  font-family: inherit;
}
.time-slot .slot-time { font-weight: 600; color: var(--navy); font-size: 0.875rem; }
.time-slot .slot-badge {
  font-size: 0.7rem; font-weight: 700; padding: 3px 10px;
  border-radius: var(--radius-full); background: #DCFCE7; color: #16A34A;
}
.time-slot.booked {
  background: var(--gray-100); border-color: var(--gray-200);
  cursor: not-allowed; opacity: 0.6;
}
.time-slot.booked .slot-badge { background: #FEE2E2; color: #DC2626; }
.time-slot.booked .slot-time { color: var(--gray-400); }
.time-slot.selected { border-color: var(--orange); background: var(--orange-light); }
.time-slot.selected .slot-time { color: var(--orange); }
.time-slot.selected .slot-badge { background: rgba(249,115,22,0.15); color: var(--orange); }
.time-slot:not(.booked):hover {
  border-color: var(--orange); background: var(--orange-light);
}
.slots-placeholder {
  text-align: center; padding: 2.5rem 1rem;
  color: var(--gray-400); font-size: 0.9rem;
}
.slots-placeholder i { font-size: 2rem; display: block; margin-bottom: 0.5rem; }

/* Special options */
.special-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200); margin-bottom: 0.75rem;
  cursor: pointer; transition: var(--transition); background: var(--white);
}
.special-option input[type="checkbox"] { display: none; }
.check-box {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--gray-200); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.check-box i { color: var(--white); font-size: 0.7rem; opacity: 0; transition: opacity 0.15s; }
.special-option.checked .check-box {
  background: var(--orange); border-color: var(--orange);
}
.special-option.checked .check-box i { opacity: 1; }
.special-option.checked { border-color: var(--orange); background: var(--orange-light); }
.special-option-text { font-size: 0.875rem; color: var(--navy); font-weight: 500; }

/* ── Review Step ── */
.review-section { margin-bottom: 1.5rem; }
.review-section h3 {
  font-size: 0.875rem; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.75rem;
  display: flex; align-items: center; justify-content: space-between;
}
.review-edit {
  font-size: 0.75rem; color: var(--orange); font-weight: 600;
  cursor: pointer; text-transform: none; letter-spacing: 0;
}
.review-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
  background: var(--gray-50); border-radius: var(--radius-sm);
  padding: 1.25rem; border: 1px solid var(--gray-200);
}
.review-item .rl { font-size: 0.75rem; color: var(--gray-400); font-weight: 500; margin-bottom: 2px; }
.review-item .rv { font-size: 0.9rem; color: var(--navy); font-weight: 600; }
.review-item.full { grid-column: 1 / -1; }

/* Price Summary */
.price-summary {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius); padding: 1.75rem; color: var(--white);
  margin-top: 1.5rem;
}
.price-summary h3 { font-size: 0.875rem; font-weight: 700; opacity: 0.65; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; }
.price-row {
  display: flex; justify-content: space-between;
  font-size: 0.875rem; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.price-row:last-child { border-bottom: none; }
.price-row.total {
  font-weight: 800; font-size: 1.1rem; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.2); border-bottom: none;
  margin-top: 4px;
}
.price-row.total .amount { color: var(--orange); }
.price-note { font-size: 0.75rem; opacity: 0.5; margin-top: 0.75rem; }
.price-factors { font-size: 0.8rem; opacity: 0.6; margin: 0 0 4px; }

/* ── Nav Buttons ── */
.step-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-100);
}
.btn-prev {
  display: flex; align-items: center; gap: 8px;
  color: var(--navy); font-weight: 600; font-size: 0.9rem;
  padding: 10px 20px; border-radius: var(--radius-full);
  border: 2px solid var(--gray-200); transition: var(--transition);
  font-family: inherit;
}
.btn-prev:hover { border-color: var(--navy); }
.btn-next, .btn-submit {
  display: flex; align-items: center; gap: 8px;
  background: var(--orange); color: var(--white);
  font-weight: 700; font-size: 0.9rem;
  padding: 12px 28px; border-radius: var(--radius-full);
  transition: var(--transition); font-family: inherit;
  box-shadow: 0 4px 16px rgba(249,115,22,0.35);
}
.btn-next:hover, .btn-submit:hover {
  background: var(--orange-dark); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249,115,22,0.45);
}
.btn-submit { background: #22C55E; box-shadow: 0 4px 16px rgba(34,197,94,0.35); }
.btn-submit:hover { background: #16A34A; box-shadow: 0 8px 24px rgba(34,197,94,0.45); }

/* ── Confirmation ── */
#confirmation { display: none; }
.confirm-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 3rem; text-align: center;
  border: 1px solid var(--gray-200); max-width: 560px; margin: 0 auto;
}
.confirm-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: #DCFCE7; color: #16A34A; font-size: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem; animation: popIn 0.5s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.confirm-card h2 { font-size: 1.75rem; font-weight: 900; color: var(--navy); margin-bottom: 0.5rem; }
.confirm-card p { color: var(--gray-600); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.5rem; }
.booking-id {
  background: var(--navy); color: var(--white);
  border-radius: var(--radius-sm); padding: 1.25rem;
  font-size: 1.5rem; font-weight: 900; letter-spacing: 4px;
  font-family: monospace; margin-bottom: 1.5rem;
}
.confirm-details {
  background: var(--gray-50); border-radius: var(--radius-sm);
  padding: 1.25rem; text-align: left; margin-bottom: 1.5rem;
  border: 1px solid var(--gray-200);
}
.confirm-detail-row {
  display: flex; justify-content: space-between;
  font-size: 0.875rem; padding: 6px 0;
  border-bottom: 1px solid var(--gray-200);
}
.confirm-detail-row:last-child { border-bottom: none; }
.confirm-detail-row .dl { color: var(--gray-400); }
.confirm-detail-row .dv { font-weight: 600; color: var(--navy); }
.confirm-actions { display: flex; flex-direction: column; gap: 0.75rem; }
.btn-confirm-primary {
  background: var(--orange); color: var(--white);
  padding: 13px 28px; border-radius: var(--radius-full);
  font-weight: 700; font-size: 0.95rem; display: flex;
  align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition); font-family: inherit;
}
.btn-confirm-primary:hover { background: var(--orange-dark); }
.btn-confirm-secondary {
  border: 2px solid var(--gray-200); color: var(--navy);
  padding: 12px 28px; border-radius: var(--radius-full);
  font-weight: 600; font-size: 0.95rem; display: flex;
  align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition); font-family: inherit;
}
.btn-confirm-secondary:hover { border-color: var(--navy); }

/* ── Payment Method Selection ── */
.pay-methods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pay-method-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 1rem 0.5rem;
  background: var(--white); border: 2px solid var(--gray-200);
  border-radius: var(--radius); cursor: pointer;
  font-family: 'Poppins', sans-serif; font-size: 0.82rem; font-weight: 600;
  color: var(--gray-800); transition: var(--transition);
}
.pay-method-btn:hover { border-color: var(--orange); color: var(--orange); }
.pay-method-btn.selected {
  border-color: var(--orange); background: var(--orange-light); color: var(--orange);
  box-shadow: 0 0 0 3px rgba(196,18,48,0.12);
}
.pay-method-btn i { font-size: 1.4rem; }
.pay-icon-img {
  width: 28px; height: 28px; object-fit: contain;
  filter: grayscale(1) brightness(0.4);
  transition: filter 0.2s;
}
.pay-method-btn.selected .pay-icon-img { filter: none; }
.pay-method-btn:hover .pay-icon-img { filter: grayscale(0.3) brightness(0.6); }

@media (max-width: 480px) {
  .pay-methods-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Responsive Book ── */
@media (max-width: 768px) {
  .step-card { padding: 1.5rem; }
  .form-row.two, .form-row.three { grid-template-columns: 1fr; }
  .item-types-grid { grid-template-columns: repeat(2,1fr); }
  .calendar-wrap { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .map-info { grid-template-columns: repeat(2,1fr); }
  .stairs-row { grid-template-columns: 1fr; }
  .progress-steps { gap: 0; }
  .step-label { display: none; }
  .step-dot { width: 30px; height: 30px; font-size: 0.75rem; }
}
@media (max-width: 480px) {
  .book-container { padding: 0 0.75rem 3rem; }
  .item-types-grid { grid-template-columns: repeat(2,1fr); }
  .map-info { grid-template-columns: 1fr; }
  .step-nav { flex-direction: column-reverse; gap: 0.75rem; }
  .btn-prev, .btn-next, .btn-submit { width: 100%; justify-content: center; }
}
