/* ==========================================================================
   Booking Container
   ========================================================================== */

.booking-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  animation: fadeInUp 0.5s ease both;
}

/* Cards and form content stay narrow */
.booking-card,
.result-card {
  max-width: 480px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Time Slot Selection
   ========================================================================== */

.time-slots {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.time-slot {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-muted);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.time-slot:hover {
  border-color: var(--color-primary-light);
  background: var(--color-primary-subtle);
}

.time-slot.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.time-slot-radio {
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition-fast);
}

.time-slot.selected .time-slot-radio {
  border-color: var(--color-primary);
}

.time-slot.selected .time-slot-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.time-slot-label {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
}

/* Override for Blazor radio buttons in time slots */
.time-slot-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-muted);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-sm);
}

.time-slot-item:hover {
  border-color: var(--color-primary-light);
  background: var(--color-primary-subtle);
}

.time-slot-item:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.time-slot-item input[type="radio"] {
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
  background: var(--color-bg-card);
  transition: all var(--transition-fast);
}

.time-slot-item input[type="radio"]:checked {
  border-color: var(--color-primary);
}

.time-slot-item input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.time-slot-item label {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  cursor: pointer;
}

/* ==========================================================================
   Step Indicator
   ========================================================================== */

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  max-width: 480px;
  margin-bottom: var(--space-xl);
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  transition: all var(--transition-base);
}

.step-dot.active {
  background: var(--color-primary);
  transform: scale(1.2);
}

.step-dot.completed {
  background: var(--color-primary-light);
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  transition: background var(--transition-base);
}

.step-line.active {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-border) 100%);
}

.step-line.completed {
  background: var(--color-primary-light);
}

/* ==========================================================================
   Address Toggle (Step 2: Delivery)
   ========================================================================== */

.address-toggle {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.address-toggle-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-muted);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.address-toggle-option:hover {
  border-color: var(--color-primary-light);
  background: var(--color-primary-subtle);
}

.address-toggle-option.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.address-toggle-option input[type="radio"] {
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
  background: var(--color-bg-card);
  transition: all var(--transition-fast);
}

.address-toggle-option.selected input[type="radio"] {
  border-color: var(--color-primary);
}

.address-toggle-option.selected input[type="radio"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.address-toggle-option label {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  cursor: pointer;
}

.address-summary {
  background: var(--color-bg-muted);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.address-summary p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.6;
}

.address-summary p strong {
  font-weight: 700;
}

/* ==========================================================================
   Delivery Address Section
   ========================================================================== */

.delivery-address-section {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px dashed var(--color-border);
  animation: expandIn 0.3s ease;
}

@keyframes expandIn {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* ==========================================================================
   Important Notice
   ========================================================================== */

.notice-box {
  background: var(--color-primary-subtle);
  border-left: 4px solid var(--color-accent);
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--space-lg);
}

.notice-box p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text);
}

.notice-box strong {
  color: var(--color-accent);
}

/* ==========================================================================
   Result Card (Step 4: Confirmation)
   ========================================================================== */

.result-card {
  padding: var(--space-2xl) var(--space-xl);
}

.result-card.result-error {
  border-bottom-color: var(--color-error);
}

.result-card.result-error:hover {
  border-bottom-color: var(--color-text);
}

.result-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  animation: iconPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes iconPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.result-icon svg {
  width: 36px;
  height: 36px;
}

.result-icon-success {
  background: var(--color-primary);
  box-shadow: 0 6px 20px rgba(0, 37, 85, 0.3);
}

.result-icon-success svg {
  color: white;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: checkDraw 0.6s ease forwards 0.3s;
}

@keyframes checkDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.result-icon-error {
  background: var(--color-error);
  box-shadow: 0 6px 20px rgba(196, 91, 91, 0.3);
}

.result-icon-error svg {
  color: white;
}

.result-actions {
  animation: fadeInUp 0.4s ease both 0.5s;
}

.result-actions .btn-primary {
  background: var(--color-primary);
}

.result-error .result-actions .btn-primary {
  background: var(--color-error);
}

.result-error .result-actions .btn-primary:hover:not(:disabled) {
  background: #a04545;
}

/* ==========================================================================
   Choice Screen
   ========================================================================== */

.choice-screen {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.choice-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

/* ==========================================================================
   Booking List (My Bookings)
   ========================================================================== */

.booking-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.booking-item {
  background: var(--color-bg-card);
  border-bottom: 2px solid var(--color-accent);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: border-bottom-color 0.2s linear;
}

.booking-item:hover {
  border-bottom-color: var(--color-text);
}

.booking-item-inactive {
  opacity: 0.7;
}

.booking-item-inactive:hover {
  border-color: var(--color-border);
}

.booking-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.booking-status-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.booking-status-new {
  background: #e8f4fd;
  color: #007dbb;
}

.booking-status-in-transit {
  background: #ecfdf5;
  color: #059669;
}

.booking-status-delivered {
  background: #d1fae5;
  color: #047857;
}

.booking-status-failed {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.booking-status-cancelled {
  background: #fefce8;
  color: #a16207;
}

.booking-date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.booking-item-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.booking-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.booking-detail-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.booking-detail-value {
  font-size: 0.9375rem;
  color: var(--color-text);
  white-space: pre-line;
}

.booking-item-actions {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px dashed var(--color-border);
}

.btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-error);
  background: transparent;
  border: 1.5px solid var(--color-error);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-cancel:hover:not(:disabled) {
  background: var(--color-error-bg);
}

.btn-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.booking-cancelled-info {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  color: var(--color-text-muted);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state p {
  margin: 0;
  font-size: 1rem;
}

   Responsive Adjustments
   ========================================================================== */

@media (max-width: 480px) {
  .booking-card {
    border-radius: var(--radius-md);
  }

  .form-row-postal {
    grid-template-columns: 100px 1fr;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn:last-child {
    order: -1;
  }
}

