/* =========================
   Trip Settings Page Styles
   Standalone styles for trip-settings page
   ========================= */

.tripSettingsContainer {
  padding: 24px 20px;
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Progress indicator */
.tsProgress {
  margin-bottom: 32px;
}

.tsProgressBar {
  width: 100%;
  height: 4px;
  background: rgba(195, 160, 235, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.tsProgressFill {
  height: 100%;
  background: var(--accentPrimary, #C3A0EB);
  transition: width 0.3s ease;
  width: 25%;
}

.tsProgressText {
  font-size: 12px;
  color: var(--muted, #999);
  text-align: center;
  font-weight: 600;
}

/* Step container */
.tsStep {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

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

/* Back button positioning */
.tsBackBtn {
  margin-bottom: 16px;
  align-self: flex-start;
}

/* Header */
.tsHeader {
  margin-bottom: 32px;
}

.tsTitle {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text, #fff);
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.tsSubtitle {
  font-size: 14px;
  color: var(--muted, #999);
  margin: 0;
  line-height: 1.4;
  font-weight: 400;
}

/* Form */
.tsForm {
  flex: 1;
  margin-bottom: 24px;
}

.tsField {
  margin-bottom: 24px;
  position: relative;
}

.tsLabel {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  margin-bottom: 8px;
}

.tsFieldHint {
  font-size: 12px;
  color: var(--muted, #999);
  margin: -4px 0 12px 0;
  line-height: 1.4;
}

/* Helper text */
.tsHelperText {
  font-size: 12px;
  color: var(--muted, #999);
  margin-bottom: 8px;
}

/* Travellers stepper */
.tsStepper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.tsStepperBtn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid rgba(195, 160, 235, 0.3);
  background: white;
  color: var(--accentPrimary, #C3A0EB);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tsStepperBtn:hover {
  background: rgba(195, 160, 235, 0.1);
  border-color: var(--accentPrimary, #C3A0EB);
}

.tsStepperBtn:active {
  transform: scale(0.95);
}

.tsStepperInput {
  width: 60px;
  height: 40px;
  text-align: center;
  border: 1.5px solid rgba(195, 160, 235, 0.3);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  background: white;
}

.tsStepperInput:focus {
  outline: none;
  border-color: var(--accentPrimary, #C3A0EB);
}

/* Date fields */
.tsDateRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
}

.tsDateField {
  display: flex;
  flex-direction: column;
  position: relative;
}

.tsDateLabel {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #666);
  margin-bottom: 6px;
}

.tsInput {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid rgba(195, 160, 235, 0.3);
  border-radius: 12px;
  font-size: 15px;
  color: var(--text, #1a1a1a);
  background: white;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.tsInput:focus {
  outline: none;
  border-color: var(--accentPrimary, #C3A0EB);
}

.tsInput::placeholder {
  color: var(--muted, #999);
}

input[type="date"].tsInput {
  font-family: 'Work Sans', sans-serif;
}

/* Custom date button */
.tsDateBtn {
  text-align: left;
  background: var(--surfaceInner, #2b1f39);
  border-color: rgba(195, 160, 235, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tsDateBtn span {
  color: var(--text, #fff);
}

/* Calendar popup */
.tsCalendarPopup {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(53, 41, 74, 0.98), rgba(45, 35, 62, 0.98));
  border: 1px solid rgba(154, 128, 196, 0.38);
  border-radius: 22px;
  padding: 14px 14px 12px;
  z-index: 100;
  box-shadow: 0 20px 40px rgba(8, 5, 16, 0.52);
}

.tsCalendarHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.tsCalendarMonthWrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tsCalendarMonth {
  font-weight: 700;
  font-size: 20px;
  color: #f5eefc;
  letter-spacing: -0.02em;
}

.tsCalendarHint {
  font-size: 11px;
  font-weight: 600;
  color: rgba(186, 171, 216, 0.82);
  text-align: center;
}

.tsCalendarNav {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(140, 118, 178, 0.45);
  background: rgba(37, 28, 52, 0.86);
  color: rgba(225, 214, 245, 0.9);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tsCalendarNav:hover {
  background: rgba(70, 53, 96, 0.8);
}

.calendarGrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendarGrid .dow {
  text-align: center;
  font-size: 10px;
  color: rgba(160, 145, 190, 0.78);
  padding: 4px 0 6px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

#calendarDays {
  margin-bottom: 12px;
}

.calendarDay {
  text-align: center;
  min-height: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  background: transparent;
  color: #e8ddfa;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.calendarDay:hover {
  background: rgba(132, 102, 235, 0.24);
}

.calendarDay.inactive {
  color: rgba(142, 126, 172, 0.6);
  cursor: default;
}

.calendarDay.inactive:hover {
  background: transparent;
}

.calendarDay.selected {
  border-color: transparent;
  background: linear-gradient(180deg, rgba(142, 112, 246, 0.96), rgba(120, 89, 224, 0.95));
  color: #fff;
  box-shadow: 0 8px 16px rgba(18, 10, 32, 0.42);
}

.calendarDay.today {
  border-color: rgba(143, 129, 201, 0.5);
}

.calendarDay.inrange {
  background: rgba(132, 102, 235, 0.24);
  color: #f1e9ff;
}

.calendarDay.range-start,
.calendarDay.range-end {
  border-color: transparent;
  background: linear-gradient(180deg, rgba(142, 112, 246, 0.96), rgba(120, 89, 224, 0.95));
  color: #fff;
}

.tsCalendarActions {
  display: flex;
  gap: 10px;
}

.tsCalendarActions .btn {
  flex: 1;
  height: 42px;
  border-radius: 14px;
}

/* Country dropdown custom */
.tsCountryBtn {
  text-align: left;
  background: var(--surfaceInner, #2b1f39);
  border-color: rgba(195, 160, 235, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.tsCountryBtn #countryDisplay {
  color: var(--text, #fff);
}

.tsDropdownArrow {
  font-size: 10px;
  color: var(--muted, #999);
  transition: transform 0.2s;
}

.tsCountryBtn.open .tsDropdownArrow {
  transform: rotate(180deg);
}

.tsCountryList {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surfaceCard, #34283D);
  border: 1.5px solid rgba(195, 160, 235, 0.4);
  border-radius: 12px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tsCountryItem {
  padding: 12px 16px;
  color: var(--text, #fff);
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.tsCountryItem:hover {
  background: rgba(195, 160, 235, 0.15);
}

.tsCountryItem:first-child {
  border-radius: 12px 12px 0 0;
}

.tsCountryItem:last-child {
  border-radius: 0 0 12px 12px;
}

select.tsInput {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23999' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Add wrapper for inline add buttons */
.tsAddWrapper {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.tsAddWrapper .tsInput {
  flex: 1;
}

.tsAddWrapper .tsAddBtn {
  width: auto;
  min-width: 70px;
  flex-shrink: 0;
}

/* Pills */
.tsPillContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tsPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(195, 160, 235, 0.15);
  color: var(--accentPrimary, #C3A0EB);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.tsPill.active {
  background: var(--accentPrimary, #C3A0EB);
  color: white;
}

.tsPillRemove {
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.tsPillRemove:hover {
  opacity: 1;
}

/* Continent grid */
.tsContinentGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

/* Base currency grid */
.tsBaseCurrencyGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

/* Meriwa pill styling (inherits from global) */
.meriwa-pill {
  font-size: 14px;
}

.meriwa-pill span:last-child {
  flex: 1;
}

/* Activity grid */
.tsActivityGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.tsActivityCard {
  aspect-ratio: 1;
  background: rgba(195, 160, 235, 0.12);
  border: 1.5px solid rgba(195, 160, 235, 0.45);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

.tsActivityCard:hover {
  border-color: rgba(195, 160, 235, 0.7);
  background: rgba(195, 160, 235, 0.18);
  transform: translateY(-1px);
}

.tsActivityCard.active {
  background: rgba(195, 160, 235, 0.3);
  border-color: rgba(207, 147, 255, 0.85);
  box-shadow: 0 0 20px rgba(195, 160, 235, 0.6), 0 0 8px rgba(207, 147, 255, 0.5), inset 0 0 0 1px rgba(207, 147, 255, 0.3);
}

.tsActivityIcon {
  font-size: 32px;
  line-height: 1;
}

.tsActivityName {
  font-size: 11px;
  font-weight: 600;
  color: var(--text, #fff);
  text-align: center;
  line-height: 1.2;
}

.tsActivityCheck {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--accentPrimary, #C3A0EB);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 0 2px 8px rgba(195, 160, 235, 0.5);
}

.tsActivityCard.active .tsActivityCheck {
  opacity: 1;
}

/* Custom activity pills (selectable) */
.tsActivityPill {
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.tsActivityPill:hover {
  background: rgba(195, 160, 235, 0.25);
}

/* Budget input with currency */
.tsBudgetInputWrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.tsBudgetCurrency {
  position: absolute;
  left: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accentPrimary, #C3A0EB);
  pointer-events: none;
}

.tsBudgetInput {
  padding-left: 36px;
}

/* Budget toggle */
.tsBudgetToggle {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: rgba(195, 160, 235, 0.1);
  border-radius: 12px;
}

.tsBudgetOption {
  flex: 1;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #999);
  cursor: pointer;
  transition: all 0.2s;
}

.tsBudgetOption.active {
  background: rgba(195, 160, 235, 0.25);
  color: var(--accentPrimary, #C3A0EB);
  box-shadow: 0 0 12px rgba(195, 160, 235, 0.3), inset 0 0 0 1px rgba(207, 147, 255, 0.2);
}

/* Slider */
.tsSlider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(195, 160, 235, 0.2);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.tsSlider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accentPrimary, #C3A0EB);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tsSlider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accentPrimary, #C3A0EB);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tsSliderLabels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted, #999);
}

/* Actions */
.tsActions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.tsContinueBtn,
.tsSkipBtn {
  width: 100%;
}

/* Confirmation state */
.tsConfirmIcon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(195, 160, 235, 0.15);
  color: var(--accentPrimary, #C3A0EB);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin: 0 auto 24px;
}

/* Responsive adjustments */
@media (max-width: 400px) {
  .tsActivityGrid {
    gap: 8px;
  }
  
  .tsActivityCard {
    padding: 12px;
  }
  
  .tsActivityIcon {
    font-size: 28px;
  }
  
  .tsActivityName {
    font-size: 12px;
  }
  
  .tsCurrencyGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}
