/* ========================================
   WHI Booking Modal — Complete CSS
   Brand: Walking Holiday Ireland
   Colors: Orange #F17E00, Purple #210747,
           Bright Purple #3F0F87, Mauve #B58DB6
   ======================================== */

/* ========================================
   1. CSS VARIABLES
   ======================================== */

:root {
  --whi-orange: #F17E00;
  --whi-orange-hover: #d97000;
  --whi-purple: #210747;
  --whi-bright-purple: #3F0F87;
  --whi-mauve: #B58DB6;
  --whi-white: #ffffff;
  --whi-bg-light: #f9fafb;
  --whi-grey-100: #f3f4f6;
  --whi-grey-200: #e5e7eb;
  --whi-grey-300: #d1d5db;
  --whi-grey-500: #6b7280;
  --whi-grey-700: #374151;
  --whi-grey-900: #1f2937;
  --whi-success: #059669;
  --whi-success-light: #d1fae5;
  --whi-success-bg: #f0fdf4;
  --whi-error: #ef4444;
  --whi-error-bg: #fef2f2;
}

/* ========================================
   2. OVERLAY & MODAL SHELL
   ======================================== */

.bm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(33, 7, 71, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  animation: bm-fade-in 0.2s ease-out;
}

@keyframes bm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.bm-overlay.bm-fade-out {
  animation: bm-fade-out 0.2s ease-out forwards;
}

@keyframes bm-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.bm-modal {
  background: var(--whi-white);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(33, 7, 71, 0.3);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: bm-slide-up 0.3s ease-out;
}

@keyframes bm-slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bm-modal.bm-slide-down {
  animation: bm-slide-down 0.2s ease-out forwards;
}

@keyframes bm-slide-down {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(24px); }
}

/* ========================================
   3. HEADER
   ======================================== */

.bm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--whi-grey-200);
  background: var(--whi-white);
}

.bm-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--whi-purple);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.bm-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--whi-grey-500);
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.bm-close-btn:hover {
  color: var(--whi-grey-900);
  background: var(--whi-grey-100);
}

/* ========================================
   4. CONTENT AREA
   ======================================== */

.bm-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ========================================
   5. FOOTER
   ======================================== */

.bm-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--whi-grey-200);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: var(--whi-white);
}

/* ========================================
   6. TOUR SUMMARY CARD (Step 1 top)
   ======================================== */

.bm-tour-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--whi-bg-light);
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid var(--whi-grey-200);
}

.bm-tour-image {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.bm-tour-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bm-tour-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--whi-purple);
  margin: 0;
  line-height: 1.3;
}

.bm-tour-meta {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--whi-grey-500);
  align-items: center;
  flex-wrap: wrap;
}

.bm-difficulty-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  letter-spacing: 0.02em;
}

.bm-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--whi-orange);
  margin-top: 2px;
}

/* ========================================
   7. FORM ELEMENTS
   ======================================== */

.bm-form-group {
  margin-bottom: 20px;
}

.bm-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--whi-grey-700);
  margin-bottom: 8px;
}

.bm-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--whi-grey-300);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--whi-grey-900);
  background: var(--whi-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.bm-input:focus {
  outline: none;
  border-color: var(--whi-orange);
  box-shadow: 0 0 0 3px rgba(241, 126, 0, 0.12);
}

.bm-input::placeholder {
  color: var(--whi-grey-300);
}

.bm-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--whi-grey-300);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--whi-grey-900);
  background-color: var(--whi-white);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.bm-select:focus {
  outline: none;
  border-color: var(--whi-orange);
  box-shadow: 0 0 0 3px rgba(241, 126, 0, 0.12);
}

.bm-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--whi-grey-300);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--whi-grey-900);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.bm-textarea:focus {
  outline: none;
  border-color: var(--whi-orange);
  box-shadow: 0 0 0 3px rgba(241, 126, 0, 0.12);
}

/* ========================================
   8. STEPPER (+/- CONTROLS)
   ======================================== */

.bm-stepper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bm-stepper-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--whi-grey-300);
  border-radius: 10px;
  background: var(--whi-white);
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  color: var(--whi-grey-700);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.bm-stepper-btn:hover:not(:disabled) {
  border-color: var(--whi-orange);
  color: var(--whi-orange);
  background: rgba(241, 126, 0, 0.04);
}

.bm-stepper-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.bm-stepper-value {
  min-width: 44px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--whi-grey-900);
}

/* ========================================
   9. CHECKBOX / EXTRAS CARDS
   ======================================== */

.bm-card {
  padding: 14px 16px;
  border: 2px solid var(--whi-grey-200);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.bm-card:hover {
  border-color: var(--whi-orange);
  background: rgba(241, 126, 0, 0.03);
}

.bm-card.bm-active {
  border-color: var(--whi-orange);
  background: rgba(241, 126, 0, 0.05);
}

.bm-card-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.bm-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--whi-orange);
}

.bm-card-content {
  flex: 1;
}

.bm-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--whi-grey-900);
  margin: 0;
}

.bm-card-description {
  font-size: 13px;
  color: var(--whi-grey-500);
  margin: 4px 0 0 0;
  line-height: 1.4;
}

.bm-card-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--whi-orange);
  margin-top: 6px;
}

.bm-card-price-type {
  font-size: 12px;
  font-weight: 400;
  color: var(--whi-grey-500);
  margin-left: 4px;
}

/* ========================================
   10. PRICE SUMMARY
   ======================================== */

.bm-price-summary {
  background: var(--whi-bg-light);
  padding: 16px;
  border-radius: 10px;
  margin-top: 20px;
  border: 1px solid var(--whi-grey-200);
}

.bm-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--whi-grey-500);
}

.bm-price-row:last-child {
  margin-bottom: 0;
}

.bm-price-row.bm-total {
  border-top: 2px solid var(--whi-grey-200);
  padding-top: 10px;
  margin-top: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--whi-purple);
}

.bm-price-amount {
  font-weight: 600;
  color: var(--whi-grey-900);
}

/* ========================================
   11. TRAVELLER CARDS (Step 2)
   ======================================== */

.bm-traveller-card {
  padding: 18px;
  background: var(--whi-bg-light);
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--whi-grey-200);
}

.bm-traveller-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.bm-traveller-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--whi-purple);
  margin: 0;
}

.bm-remove-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--whi-error);
  border-radius: 6px;
  background: var(--whi-white);
  cursor: pointer;
  color: var(--whi-error);
  transition: all 0.2s;
}

.bm-remove-btn:hover {
  background: var(--whi-error-bg);
}

/* ========================================
   12. REVIEW & SUMMARY (Step 3)
   ======================================== */

.bm-summary-card {
  padding: 18px;
  background: var(--whi-bg-light);
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--whi-grey-200);
}

.bm-summary-section {
  margin-bottom: 16px;
}

.bm-summary-section:last-child {
  margin-bottom: 0;
}

.bm-summary-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--whi-grey-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 6px 0;
}

.bm-summary-text {
  font-size: 14px;
  color: var(--whi-grey-900);
  margin: 3px 0;
  line-height: 1.5;
}

/* ========================================
   13. PAYMENT METHOD RADIOS (Step 3)
   ======================================== */

.bm-radio-card {
  padding: 16px;
  border: 2px solid var(--whi-grey-200);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: all 0.2s;
}

.bm-radio-card:hover {
  border-color: var(--whi-orange);
  background: rgba(241, 126, 0, 0.03);
}

.bm-radio-card.bm-active {
  border-color: var(--whi-orange);
  background: rgba(241, 126, 0, 0.05);
}

.bm-radio {
  width: 22px;
  height: 22px;
  border: 2px solid var(--whi-grey-300);
  border-radius: 50%;
  margin-top: 1px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
}

.bm-radio-card.bm-active .bm-radio {
  border-color: var(--whi-orange);
  background: var(--whi-orange);
}

.bm-radio-card.bm-active .bm-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  background: var(--whi-white);
  border-radius: 50%;
}

.bm-radio-content {
  flex: 1;
}

.bm-radio-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--whi-grey-900);
  margin: 0;
}

.bm-radio-subtitle {
  font-size: 13px;
  color: var(--whi-grey-500);
  margin: 3px 0 0 0;
}

/* ========================================
   14. CONFIRMATION SCREEN
   ======================================== */

.bm-confirmation {
  text-align: center;
  padding: 16px 0;
}

.bm-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--whi-success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bm-scale-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bm-scale-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.bm-checkmark svg {
  width: 48px;
  height: 48px;
  color: var(--whi-success);
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.bm-confirmation-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--whi-purple);
  margin: 0 0 8px 0;
}

.bm-confirmation-ref {
  font-family: 'Courier New', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--whi-success);
  margin: 16px 0;
  padding: 12px;
  background: var(--whi-success-bg);
  border-radius: 8px;
  display: inline-block;
}

.bm-confirmation-message {
  font-size: 14px;
  color: var(--whi-grey-500);
  margin: 16px 0;
  line-height: 1.6;
}

/* ========================================
   15. WHAT HAPPENS NEXT
   ======================================== */

.bm-next-steps {
  margin: 24px 0;
  text-align: left;
  background: var(--whi-bg-light);
  padding: 18px;
  border-radius: 10px;
  border: 1px solid var(--whi-grey-200);
}

.bm-next-steps-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--whi-purple);
  margin: 0 0 12px 0;
}

.bm-next-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bm-next-steps-item {
  font-size: 14px;
  color: var(--whi-grey-500);
  margin-bottom: 10px;
  padding-left: 28px;
  position: relative;
  line-height: 1.4;
}

.bm-next-steps-item:last-child {
  margin-bottom: 0;
}

.bm-next-steps-item::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--whi-success);
  font-weight: 700;
  font-size: 15px;
}

/* ========================================
   16. CONTACT LINKS
   ======================================== */

.bm-contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  margin: 20px 0 0 0;
}

.bm-contact-link {
  color: var(--whi-bright-purple);
  text-decoration: none;
  transition: color 0.2s;
}

.bm-contact-link:hover {
  color: var(--whi-orange);
}

/* ========================================
   17. BUTTONS
   ======================================== */

.bm-btn {
  padding: 11px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.bm-btn-primary {
  background: var(--whi-orange);
  color: white;
}

.bm-btn-primary:hover:not(:disabled) {
  background: var(--whi-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(241, 126, 0, 0.3);
}

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

.bm-btn-secondary {
  background: var(--whi-grey-100);
  color: var(--whi-grey-700);
  border: 1px solid var(--whi-grey-300);
}

.bm-btn-secondary:hover:not(:disabled) {
  background: var(--whi-grey-200);
}

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

/* ========================================
   18. SPINNER & ERRORS
   ======================================== */

.bm-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: bm-spin 0.8s linear infinite;
}

@keyframes bm-spin {
  to { transform: rotate(360deg); }
}

.bm-error {
  color: var(--whi-error);
  font-size: 13px;
  margin-top: 6px;
}

/* ========================================
   19. RESPONSIVE — MOBILE
   ======================================== */

@media (max-width: 640px) {
  .bm-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .bm-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
    animation: bm-slide-up-mobile 0.3s ease-out;
  }

  @keyframes bm-slide-up-mobile {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  .bm-header {
    padding: 16px 20px;
  }

  .bm-content {
    padding: 20px;
  }

  .bm-footer {
    padding: 14px 20px;
    flex-direction: column-reverse;
  }

  .bm-btn {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
  }

  .bm-tour-card {
    flex-direction: column;
  }

  .bm-tour-image {
    width: 100%;
    height: 140px;
  }

  .bm-price {
    font-size: 18px;
  }
}

@media (max-width: 400px) {
  .bm-title {
    font-size: 17px;
  }

  .bm-content {
    padding: 16px;
  }
}
