/* =============================================================================
   TRIPLANKA — BUILD-JOURNEY.CSS
   Styles for the Build Your Journey page.
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */
.build-journey-hero {
  background-image: url('https://triplanka-assets-au.s3.ap-southeast-2.amazonaws.com/build-your-journey/hero/build-your-journey-hero.jpeg');
}

/* ---------------------------------------------------------------------------
   Intro section spacing
   --------------------------------------------------------------------------- */
.build-journey-intro {
  padding-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Builder layout — map + form side by side
   --------------------------------------------------------------------------- */
.build-journey__layout {
  display: grid;
  grid-template-columns: 58% 1fr;
  gap: var(--space-8);
  align-items: stretch;
}

@media (max-width: 900px) {
  .build-journey__layout {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------------------
   Map column
   --------------------------------------------------------------------------- */
.build-journey__map-header {
  margin-bottom: var(--space-3);
}

.build-journey__map-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--blue-dark);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-1);
}

.build-journey__map-title i {
  color: var(--blue-primary);
  margin-right: var(--space-2);
}

.build-journey__map-hint {
  font-size: var(--text-sm);
  color: var(--text-mid);
}

.build-journey__map-col {
  display: flex;
  flex-direction: column;
}

.build-journey__map {
  width: 100%;
  flex: 1;
  min-height: 540px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light, #e2e8f0);
}

@media (max-width: 900px) {
  .build-journey__map {
    height: 360px;
  }
}

.build-journey__selected-summary {
  margin-top: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: #2D9B5B;
  font-weight: var(--weight-semibold);
}

/* ---------------------------------------------------------------------------
   Form column
   --------------------------------------------------------------------------- */
.build-journey__form-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-8);
}

.build-journey__form-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--blue-dark);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2);
}

.build-journey__form-intro {
  font-size: var(--text-sm);
  color: var(--text-mid);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

/* ---------------------------------------------------------------------------
   Form elements — prefixed bj- to avoid conflicts with homepage form styles
   --------------------------------------------------------------------------- */
.bj-form-group {
  margin-bottom: var(--space-5);
}

.bj-form-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-dark);
  margin-bottom: var(--space-2);
}

.bj-form-label-hint {
  font-size: 0.75rem;
  font-weight: var(--weight-normal);
  color: var(--text-light, #94a3b8);
}

.bj-form-required {
  color: #dc3545;
  margin-left: 2px;
}

.bj-form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  outline: none;
  box-sizing: border-box;
}

.bj-form-control:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 205, 0.12);
}

.bj-form-control[readonly] {
  background: #f8f9fa;
  color: var(--text-mid);
  cursor: default;
}

.bj-form-control--error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.bj-field-error {
  display: none;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: #dc3545;
}

.bj-field-error:not([hidden]) {
  display: block;
}

.bj-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.bj-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.bj-form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light, #94a3b8);
  margin-top: var(--space-1);
}

.bj-btn--full {
  width: 100%;
  justify-content: center;
  margin-top: var(--space-2);
}

/* Success message — display:none by default; flex only when not hidden */
.bj-form-success {
  display: none;
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: var(--radius-md);
  color: #166534;
  font-size: var(--text-sm);
  align-items: flex-start;
  gap: var(--space-3);
  line-height: 1.6;
}

.bj-form-success:not([hidden]) {
  display: flex;
}

.bj-form-success i {
  color: #22c55e;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Error message — display:none by default; flex only when not hidden */
.bj-form-error {
  display: none;
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: #fff5f5;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius-md);
  color: #991b1b;
  font-size: var(--text-sm);
  align-items: flex-start;
  gap: var(--space-3);
  line-height: 1.6;
}

.bj-form-error:not([hidden]) {
  display: flex;
}

.bj-form-error a {
  color: #991b1b;
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Leaflet marker popup
   --------------------------------------------------------------------------- */
.journey-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg, 0 10px 25px rgba(0,0,0,0.15));
  padding: 0;
}

.journey-popup-wrap .leaflet-popup-content {
  margin: 0;
}

.journey-popup {
  padding: var(--space-4);
  min-width: 170px;
}

.journey-popup__name {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--blue-dark);
  margin-bottom: 2px;
}

.journey-popup__region {
  font-size: var(--text-sm);
  color: var(--text-mid);
  margin-bottom: var(--space-3);
}

.journey-popup__btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base);
}

.journey-popup__btn--add {
  background: var(--blue-primary);
  color: var(--white);
}

.journey-popup__btn--add:hover {
  background: var(--blue-dark);
}

.journey-popup__btn--remove {
  background: #fee2e2;
  color: #991b1b;
}

.journey-popup__btn--remove:hover {
  background: #fca5a5;
}

/* Leaflet tooltip */
.journey-marker-tooltip {
  background: var(--blue-dark) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-body) !important;
  font-size: var(--text-sm) !important;
  padding: 4px 10px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
}

.journey-marker-tooltip::before {
  border-top-color: var(--blue-dark) !important;
}

/* ---------------------------------------------------------------------------
   PAX stepper (shared pattern with quote page)
   --------------------------------------------------------------------------- */
.pax-stepper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.pax-stepper__btn {
  width: 44px;
  height: 52px;
  flex-shrink: 0;
  background: var(--blue-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base);
}

.pax-stepper__btn:hover { background: var(--blue-primary); }

.pax-stepper__btn:disabled {
  background: var(--cream-deeper);
  color: var(--text-light);
  cursor: not-allowed;
}

.pax-stepper__input {
  text-align: center;
  font-weight: var(--weight-semibold);
  font-size: var(--text-lg);
  flex: 1;
  min-width: 0;
  -moz-appearance: textfield;
}

.pax-stepper__input::-webkit-inner-spin-button,
.pax-stepper__input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ---------------------------------------------------------------------------
   Budget slider (shared pattern with quote page)
   --------------------------------------------------------------------------- */
.budget-display {
  display: inline-block;
  margin-left: var(--space-3);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--blue-dark);
}

.budget-slider-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.budget-slider__min,
.budget-slider__max {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.budget-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--blue-dark) 0%, var(--blue-dark) 44%, var(--cream-deeper) 44%);
  outline: none;
  cursor: pointer;
  min-height: unset;
}

.budget-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-dark);
  border: 3px solid var(--white);
  box-shadow: 0 1px 6px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.budget-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.budget-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-dark);
  border: 3px solid var(--white);
  box-shadow: 0 1px 6px rgba(0,0,0,0.25);
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Travel date row
   --------------------------------------------------------------------------- */
.bj-form-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.bj-form-label-sub {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

/* ---------------------------------------------------------------------------
   Destination detail page — Add to Journey button state
   --------------------------------------------------------------------------- */
.dest-add-journey-btn--added {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

/* ---------------------------------------------------------------------------
   Checkbox
   --------------------------------------------------------------------------- */
.bj-form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-body);
  user-select: none;
}

.bj-form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--blue-dark);
  cursor: pointer;
}
