/* Virgin Voyages research tools
   Scoped to #voyage-tools so the existing cruise-page system remains untouched. */

#voyage-tools {
  --vv-tools-surface: rgba(17, 17, 40, 0.92);
  --vv-tools-surface-raised: rgba(255, 255, 255, 0.045);
  --vv-tools-border: rgba(255, 255, 255, 0.1);
  --vv-tools-border-strong: rgba(255, 255, 255, 0.16);
  --vv-tools-focus: #8bffe6;
  position: relative;
  padding: 88px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background:
    radial-gradient(circle at 90% 4%, rgba(233, 69, 96, 0.13), transparent 32rem),
    radial-gradient(circle at 7% 92%, rgba(0, 212, 170, 0.09), transparent 30rem),
    #0a0a1a;
}

#voyage-tools,
#voyage-tools *,
#voyage-tools *::before,
#voyage-tools *::after {
  box-sizing: border-box;
}

#voyage-tools :where(h2, h3, h4, p, ul) {
  margin-top: 0;
}

#voyage-tools :where(button, input, select, textarea) {
  font: inherit;
}

#voyageTools {
  scroll-margin-top: 72px;
}

#voyage-tools .vv-tools-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

#voyage-tools .vv-tools-kicker {
  margin-bottom: 8px;
  color: var(--accent, #e94560);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
}

#voyage-tools .vv-tools-title {
  max-width: 800px;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

#voyage-tools .vv-tools-intro {
  max-width: 750px;
  margin: 12px 0 0;
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
  font-size: 0.96rem;
  line-height: 1.65;
}

#voyage-tools .vv-tools-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(0, 212, 170, 0.28);
  border-radius: var(--radius-pill, 999px);
  background: rgba(0, 212, 170, 0.08);
  color: #a8ffed;
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

#voyage-tools .vv-tools-status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal, #00d4aa);
  box-shadow: 0 0 0 5px rgba(0, 212, 170, 0.1);
  content: "";
}

#voyage-tools .vv-tools-shell {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--vv-tools-border-strong);
  border-radius: var(--radius, 16px);
  background: var(--vv-tools-surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

#voyage-tools .vv-tools-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--vv-tools-border);
  background: rgba(5, 5, 18, 0.35);
}

#voyage-tools .vv-tools-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition:
    color var(--transition, 0.3s ease),
    border-color var(--transition, 0.3s ease),
    background var(--transition, 0.3s ease);
}

#voyage-tools .vv-tools-tab:hover {
  color: var(--text, #fff);
  background: rgba(255, 255, 255, 0.045);
}

#voyage-tools .vv-tools-tab[aria-selected="true"],
#voyage-tools .vv-tools-tab.is-active {
  border-color: rgba(233, 69, 96, 0.34);
  background: rgba(233, 69, 96, 0.12);
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--accent, #e94560);
}

#voyage-tools .vv-tools-tab > span:last-child {
  display: grid;
  min-width: 0;
  text-align: left;
}

#voyage-tools .vv-tools-tab small {
  color: inherit;
  font-size: 0.64rem;
  font-weight: 600;
  opacity: 0.7;
}

#voyage-tools .vv-tools-tab-step {
  display: inline-grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.68rem;
}

#voyage-tools .vv-tools-panel {
  min-width: 0;
  padding: 28px;
  scroll-margin-top: 86px;
}

#voyage-tools .vv-tools-panel[hidden] {
  display: none;
}

#voyage-tools .vv-tools-panel-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

#voyage-tools .vv-tools-panel-header h3 {
  margin-bottom: 5px;
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.3;
}

#voyage-tools .vv-tools-panel-header p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  font-size: 0.8rem;
  line-height: 1.55;
}

#voyage-tools .vv-tools-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 20px;
  align-items: start;
}

#voyage-tools .vv-tools-layout:has(.vv-tools-results[hidden]) {
  grid-template-columns: 1fr;
}

#voyage-tools .vv-tools-layout:has(.vv-tools-results[hidden]) .vv-tools-output {
  display: none;
}

#voyage-tools .vv-tools-form-card,
#voyage-tools .vv-tools-results {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--vv-tools-border);
  border-radius: var(--radius-sm, 12px);
  background: rgba(255, 255, 255, 0.022);
}

#voyage-tools .vv-tools-form {
  min-width: 0;
}

#voyage-tools .vv-tools-output {
  min-width: 0;
}

#voyage-tools .vv-tools-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

#voyage-tools .vv-tools-field,
#voyage-tools .vv-tools-fieldset {
  min-width: 0;
}

#voyage-tools .vv-tools-field.is-wide,
#voyage-tools .vv-tools-fieldset.is-wide {
  grid-column: 1 / -1;
}

#voyage-tools .vv-tools-field > label,
#voyage-tools .vv-tools-field-label,
#voyage-tools .vv-tools-fieldset > legend {
  display: block;
  margin-bottom: 7px;
  padding: 0;
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.4;
}

#voyage-tools .vv-tools-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

#voyage-tools .vv-tools-field :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  outline: none;
  background: rgba(255, 255, 255, 0.048);
  color: var(--text, #fff);
  font-size: 0.88rem;
  line-height: 1.4;
  transition:
    border-color var(--transition, 0.3s ease),
    background var(--transition, 0.3s ease),
    box-shadow var(--transition, 0.3s ease);
}

#voyage-tools .vv-tools-field textarea {
  min-height: 92px;
  resize: vertical;
}

#voyage-tools .vv-tools-field select {
  appearance: auto;
}

#voyage-tools .vv-tools-field select option {
  background: var(--bg-card, #111128);
  color: var(--text, #fff);
}

#voyage-tools .vv-tools-field input::placeholder,
#voyage-tools .vv-tools-field textarea::placeholder {
  color: var(--text-faint, rgba(255, 255, 255, 0.3));
}

#voyage-tools .vv-tools-help {
  display: block;
  margin-top: 6px;
  color: var(--text-faint, rgba(255, 255, 255, 0.3));
  font-size: 0.67rem;
  line-height: 1.45;
}

#voyage-tools .vv-tools-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#voyage-tools .vv-tools-choice {
  position: relative;
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--vv-tools-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  transition:
    color var(--transition, 0.3s ease),
    border-color var(--transition, 0.3s ease),
    background var(--transition, 0.3s ease);
}

#voyage-tools .vv-tools-choice:hover {
  border-color: var(--vv-tools-border-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text, #fff);
}

#voyage-tools .vv-tools-choice:has(input:checked) {
  border-color: rgba(0, 212, 170, 0.4);
  background: rgba(0, 212, 170, 0.09);
  color: #c5fff3;
}

#voyage-tools .vv-tools-choice input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--teal, #00d4aa);
}

#voyage-tools .vv-tools-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

#voyage-tools .vv-tools-actions > p {
  flex: 1 1 220px;
  margin: 0;
  color: var(--text-faint, rgba(255, 255, 255, 0.3));
  font-size: 0.68rem;
  line-height: 1.5;
}

#voyage-tools .vv-tools-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid var(--vv-tools-border-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition:
    color var(--transition, 0.3s ease),
    border-color var(--transition, 0.3s ease),
    background var(--transition, 0.3s ease),
    transform var(--transition, 0.3s ease);
}

#voyage-tools .vv-tools-button:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text, #fff);
  transform: translateY(-1px);
}

#voyage-tools .vv-tools-button.is-primary,
#voyage-tools .vv-tools-button.primary {
  border-color: transparent;
  background: var(--accent, #e94560);
  color: #fff;
  box-shadow: 0 8px 22px rgba(233, 69, 96, 0.2);
}

#voyage-tools .vv-tools-button.is-primary:hover,
#voyage-tools .vv-tools-button.primary:hover {
  background: var(--accent-hover, #ff5a75);
}

#voyage-tools .vv-tools-button.secondary {
  border-color: rgba(0, 212, 170, 0.34);
  background: rgba(0, 212, 170, 0.1);
  color: #b6fff0;
}

#voyage-tools .vv-tools-button[hidden] {
  display: none;
}

#voyage-tools .vv-tools-results[hidden],
#voyage-tools .vv-tools-confirmation:empty {
  display: none;
}

#voyage-tools .vv-tools-results-summary,
#voyage-tools .vv-tools-cabin-hero {
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid rgba(0, 212, 170, 0.28);
  border-radius: var(--radius-sm, 12px);
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.11), rgba(17, 17, 40, 0.68));
}

#voyage-tools .vv-tools-result-kicker {
  margin-bottom: 7px;
  color: var(--teal, #00d4aa);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

#voyage-tools .vv-tools-results-summary h3,
#voyage-tools .vv-tools-cabin-hero h3 {
  margin-bottom: 7px;
  font-size: clamp(1.18rem, 2.6vw, 1.65rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

#voyage-tools .vv-tools-results-summary p,
#voyage-tools .vv-tools-cabin-hero p {
  margin-bottom: 0;
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
  font-size: 0.78rem;
  line-height: 1.6;
}

#voyage-tools .vv-tools-lanes {
  display: grid;
  gap: 9px;
}

#voyage-tools .vv-tools-lane {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--vv-tools-border);
  border-radius: 10px;
  background: var(--vv-tools-surface-raised);
}

#voyage-tools .vv-tools-lane.is-priority {
  border-color: rgba(0, 212, 170, 0.32);
  background: rgba(0, 212, 170, 0.05);
}

#voyage-tools .vv-tools-lane-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 7px;
}

#voyage-tools .vv-tools-lane-title,
#voyage-tools .vv-tools-cabin-name {
  min-width: 0;
  color: var(--text, #fff);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#voyage-tools .vv-tools-lane p,
#voyage-tools .vv-tools-cabin-card p {
  margin-bottom: 0;
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  font-size: 0.71rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#voyage-tools .vv-tools-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill, 999px);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
}

#voyage-tools .vv-tools-badge.is-start,
#voyage-tools .vv-tools-badge[data-status="start"] {
  border-color: rgba(0, 212, 170, 0.3);
  background: rgba(0, 212, 170, 0.12);
  color: #8bffe6;
}

#voyage-tools .vv-tools-badge.is-parallel,
#voyage-tools .vv-tools-badge[data-status="parallel"] {
  border-color: rgba(147, 187, 253, 0.28);
  background: rgba(59, 130, 246, 0.13);
  color: #b9d3ff;
}

#voyage-tools .vv-tools-badge.is-check,
#voyage-tools .vv-tools-badge[data-status="check"] {
  border-color: rgba(240, 192, 64, 0.3);
  background: rgba(240, 192, 64, 0.11);
  color: #f6d678;
}

#voyage-tools .vv-tools-badge.is-after,
#voyage-tools .vv-tools-badge[data-status="after"] {
  border-color: rgba(201, 165, 247, 0.28);
  background: rgba(168, 85, 247, 0.12);
  color: #dac1fa;
}

#voyage-tools .vv-tools-badge.is-conflict {
  border-color: rgba(233, 69, 96, 0.4);
  background: rgba(233, 69, 96, 0.13);
  color: #ffacba;
  white-space: normal;
}

#voyage-tools .vv-tools-meta,
#voyage-tools .vv-tools-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

#voyage-tools .vv-tools-meta li,
#voyage-tools .vv-tools-tag {
  max-width: 100%;
  padding: 4px 8px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#voyage-tools .vv-tools-comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

#voyage-tools .vv-tools-cabin-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--vv-tools-border);
  border-radius: 10px;
  background: var(--vv-tools-surface-raised);
}

#voyage-tools .vv-tools-cabin-card.is-recommended {
  border-color: rgba(233, 69, 96, 0.38);
  background: rgba(233, 69, 96, 0.07);
  box-shadow: inset 3px 0 0 var(--accent, #e94560);
}

#voyage-tools .vv-tools-cabin-card.is-incompatible {
  border-color: rgba(233, 69, 96, 0.22);
  background: rgba(233, 69, 96, 0.035);
}

#voyage-tools .vv-tools-cabin-card .vv-tools-badge {
  margin-bottom: 8px;
}

#voyage-tools .vv-tools-cabin-name {
  margin-bottom: 6px;
}

#voyage-tools .vv-tools-notice {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--vv-tools-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  font-size: 0.69rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#voyage-tools .vv-tools-notice strong {
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
}

#voyage-tools .vv-tools-notice > strong,
#voyage-tools .vv-tools-notice > span {
  display: block;
}

#voyage-tools .vv-tools-notice > strong {
  margin-bottom: 4px;
}

#voyage-tools .vv-tools-notice.is-warning,
#voyage-tools .vv-tools-notice.warning {
  border-color: rgba(240, 192, 64, 0.27);
  background: rgba(240, 192, 64, 0.07);
  color: #e6d294;
}

#voyage-tools .vv-tools-notice.is-info,
#voyage-tools .vv-tools-notice.info {
  border-color: rgba(59, 130, 246, 0.26);
  background: rgba(59, 130, 246, 0.075);
  color: #bed4fb;
}

#voyage-tools .vv-tools-confirmation {
  flex-basis: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 8px;
  background: rgba(0, 212, 170, 0.09);
  color: #a8ffed;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.45;
}

#voyage-tools > .container > .vv-tools-confirmation {
  margin: 14px 0 0;
}

#voyage-tools .vv-tools-source-note {
  margin: 15px 0 0;
  color: var(--text-faint, rgba(255, 255, 255, 0.3));
  font-size: 0.65rem;
  line-height: 1.55;
}

#voyage-tools .vv-tools-source-note a {
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

#voyage-tools .vv-tools-source-note a:hover {
  color: var(--text, #fff);
}

#voyage-tools :where(
  .vv-tools-tab,
  .vv-tools-button,
  .vv-tools-choice,
  input,
  select,
  textarea,
  a
):focus-visible {
  outline: 3px solid var(--vv-tools-focus);
  outline-offset: 3px;
}

#voyage-tools .vv-tools-field :where(input, select, textarea):focus-visible {
  border-color: var(--teal, #00d4aa);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

#voyage-tools .vv-tools-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 900px) {
  #voyage-tools .vv-tools-layout {
    grid-template-columns: 1fr;
  }

  #voyage-tools .vv-tools-results {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  #voyage-tools {
    padding: 68px 0;
  }

  #voyage-tools .vv-tools-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  #voyage-tools .vv-tools-status {
    justify-self: start;
  }

  #voyage-tools .vv-tools-panel {
    padding: 22px;
  }

  #voyage-tools .vv-tools-panel-header {
    display: block;
  }
}

@media (max-width: 560px) {
  #voyage-tools .vv-tools-tabs {
    gap: 4px;
    padding: 6px;
  }

  #voyage-tools .vv-tools-tab {
    min-height: 52px;
    padding: 9px 8px;
    font-size: 0.76rem;
  }

  #voyage-tools .vv-tools-panel {
    padding: 16px;
  }

  #voyage-tools .vv-tools-form-card,
  #voyage-tools .vv-tools-results {
    padding: 16px;
  }

  #voyage-tools .vv-tools-form-grid,
  #voyage-tools .vv-tools-choice-grid,
  #voyage-tools .vv-tools-comparison-grid {
    grid-template-columns: 1fr;
  }

  #voyage-tools .vv-tools-field.is-wide,
  #voyage-tools .vv-tools-fieldset.is-wide {
    grid-column: auto;
  }

  #voyage-tools .vv-tools-lane-header {
    display: block;
  }

  #voyage-tools .vv-tools-lane-header .vv-tools-badge {
    margin-top: 7px;
  }

  #voyage-tools .vv-tools-actions,
  #voyage-tools .vv-tools-button {
    width: 100%;
  }

  #voyage-tools .vv-tools-results-summary,
  #voyage-tools .vv-tools-cabin-hero {
    padding: 17px;
  }
}

@media (max-width: 360px) {
  #voyage-tools .vv-tools-tab {
    font-size: 0.71rem;
  }

  #voyage-tools .vv-tools-tab small {
    display: none;
  }

  #voyage-tools .vv-tools-panel,
  #voyage-tools .vv-tools-form-card,
  #voyage-tools .vv-tools-results {
    padding: 14px;
  }

  #voyage-tools .vv-tools-status {
    max-width: 100%;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  #voyage-tools *,
  #voyage-tools *::before,
  #voyage-tools *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
