#twWidget, #twWidget * { box-sizing: border-box; }
#twWidget {
  --tw-navy: #10254d;
  --tw-navy-dark: #0b1c3d;
  --tw-border: #e2e6ee;
  --tw-text: #1c2536;
  --tw-muted: #7c8493;
  --tw-bg-field: #ffffff;
  --tw-bg-panel: #f6f8fb;
  --tw-radius: 10px;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--tw-border);
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 6px 24px rgba(16, 37, 77, 0.08);
}

/* Tabs */
#twWidget .tw-tabs {
  background: var(--tw-navy);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 14px 14px 0 0;
  overflow-x: auto;
}
#twWidget .tw-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 14px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
#twWidget .tw-tab-icon { width: 16px; height: 16px; flex-shrink: 0; }
#twWidget .tw-tab:hover { color: #fff; background: rgba(255,255,255,0.06); }
#twWidget .tw-tab.is-active { color: var(--tw-navy); background: #fff; }

/* Form */
#twWidget .tw-form { padding: 18px 20px; }
#twWidget .tw-fields {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr 1fr;
  gap: 22px;
  align-items: end;
}
#twWidget .tw-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
#twWidget .tw-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tw-muted);
}
#twWidget .tw-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius);
  background: var(--tw-bg-field);
  height: 46px;
  padding: 0 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#twWidget .tw-select-wrap:focus-within {
  border-color: var(--tw-navy);
  box-shadow: 0 0 0 3px rgba(16,37,77,0.12);
}
#twWidget select, #twWidget input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--tw-text);
  width: 100%;
  height: 100%;
  padding-right: 20px;
  cursor: pointer;
}
#twWidget input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0; position: absolute; right: 0; width: 100%; height: 100%; cursor: pointer; }
#twWidget .tw-chevron { width: 16px; height: 16px; color: var(--tw-muted); position: absolute; right: 12px; pointer-events: none; }
#twWidget .tw-cal { color: var(--tw-muted); }

/* Date field needs more breathing room so the typed date never collides
   with the calendar icon (browsers render the date value with fixed-width
   segments that are wider than a normal select's text). */
#twWidget input[type="date"] {
  padding-right: 26px;
  font-size: 13.5px;
  letter-spacing: -0.2px;
}
#twWidget .tw-field:nth-of-type(3) .tw-select-wrap {
  padding-right: 10px;
}

#twWidget .tw-swap {
  position: absolute;
  left: 25%;
  top: 29px;
  transform: translate(-50%, 0);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--tw-border);
  background: #fff;
  color: var(--tw-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.15s ease, background 0.15s ease;
}
#twWidget .tw-swap svg { width: 12px; height: 12px; }
#twWidget .tw-swap:hover { background: var(--tw-bg-panel); transform: translate(-50%, 0) rotate(180deg); }

/* Travelers */
#twWidget .tw-field-travelers { position: relative; }
#twWidget .tw-trav-btn { width: 100%; cursor: pointer; text-align: left; font-family: inherit; }
#twWidget .tw-trav-btn span { font-size: 14.5px; font-weight: 600; color: var(--tw-text); }
#twWidget .tw-trav-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: #fff;
  border: 1px solid var(--tw-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16,37,77,0.16);
  padding: 14px;
  z-index: 20;
}
#twWidget .tw-trav-panel.is-open { display: block; }
#twWidget .tw-trav-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
#twWidget .tw-trav-row + .tw-trav-row { border-top: 1px solid var(--tw-border); }
#twWidget .tw-trav-title { font-size: 14px; font-weight: 600; color: var(--tw-text); }
#twWidget .tw-trav-sub { font-size: 12px; color: var(--tw-muted); }
#twWidget .tw-stepper { display: flex; align-items: center; gap: 12px; }
#twWidget .tw-stepper span { min-width: 16px; text-align: center; font-weight: 600; }
#twWidget .tw-step-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--tw-border);
  background: #fff;
  color: var(--tw-navy);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#twWidget .tw-step-btn:hover { background: var(--tw-bg-panel); }
#twWidget .tw-step-btn:disabled { opacity: 0.35; cursor: not-allowed; }
#twWidget .tw-trav-done {
  margin-top: 12px;
  width: 100%;
  background: var(--tw-navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
#twWidget .tw-trav-done:hover { background: var(--tw-navy-dark); }

/* Row 2 */
#twWidget .tw-row2 { display: flex; gap: 10px; margin-top: 12px; }
#twWidget .tw-dmc { flex: 1; height: 46px; }
#twWidget .tw-dmc-placeholder {
  position: absolute;
  left: 13px;
  font-size: 14.5px;
  color: var(--tw-muted);
  font-weight: 500;
  pointer-events: none;
}
#twWidget .tw-dmc select { position: relative; z-index: 1; color: var(--tw-text); }
#twWidget .tw-dmc select:focus { outline: none; }
#twWidget .tw-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--tw-navy);
  color: #fff;
  border: none;
  border-radius: var(--tw-radius);
  padding: 0 26px;
  height: 46px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
#twWidget .tw-search-icon { width: 16px; height: 16px; }
#twWidget .tw-search-btn:hover { background: var(--tw-navy-dark); }

#twWidget .tw-error {
  margin: 10px 2px 0;
  color: #c0392b;
  font-size: 13px;
  font-weight: 500;
}

#twWidget .tw-trust {
  text-align: left;
  margin: 0;
  padding: 0 20px 18px;
  font-size: 12.5px;
  color: var(--tw-muted);
}

/* Responsive */
@media (max-width: 760px) {
  #twWidget .tw-fields { grid-template-columns: 1fr; gap: 12px; }
  #twWidget .tw-fields > .tw-field:nth-of-type(1) { order: 1; }
  #twWidget .tw-swap { order: 2; }
  #twWidget .tw-fields > .tw-field:nth-of-type(2) { order: 3; }
  #twWidget .tw-fields > .tw-field:nth-of-type(3) { order: 4; }
  #twWidget .tw-fields > .tw-field:nth-of-type(4) { order: 5; }
  #twWidget .tw-swap {
    position: static;
    transform: rotate(90deg);
    align-self: center;
    margin: -2px 0;
  }
  #twWidget .tw-swap:hover { transform: rotate(270deg); }
  #twWidget .tw-row2 { flex-direction: column; }
  #twWidget .tw-search-btn { width: 100%; }
  #twWidget .tw-trav-panel { left: 0; right: auto; width: 100%; }
}
