/**
 * UNIVRS v1.5.2.5.5.3 — Trips presentation restoration + Map operations layout
 *
 * This file intentionally restores the established full-width Trips workspace.
 * The active World remains the visual source of truth; no replacement route
 * renderer or fixed-white palette is allowed to own the page.
 */

/* The selected trip uses the established one-column content flow. */
.univrs-app .univrs-plan-workspace,
.univrs-app [data-plan-workspace],
.univrs-app .univrs-trips-shell-v1398 {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.univrs-app .uv-trip-workspace-nav-v15251 {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 0 20px !important;
  padding: 8px !important;
  border-color: var(--u-line) !important;
  background: color-mix(in srgb, var(--u-card) 90%, transparent) !important;
  color: var(--u-ink) !important;
  backdrop-filter: blur(14px);
}

.univrs-app .uv-trip-workspace-nav-v15251 > div {
  display: flex !important;
  flex: 1 1 auto !important;
  gap: 6px !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  scrollbar-width: thin;
}

.univrs-app .uv-trip-workspace-nav-v15251 > button,
.univrs-app .uv-trip-workspace-nav-v15251 > div button {
  flex: 0 0 auto;
  background: transparent !important;
  color: var(--u-ink) !important;
}

.univrs-app .uv-trip-workspace-nav-v15251 > div button.is-active {
  background: var(--u-world-foundation, var(--u-ink)) !important;
  color: #fff !important;
}

/* Restore World-aware surfaces instead of the isolated white replacement. */
.univrs-app .univrs-trip-hero-v1398,
.univrs-app .univrs-trip-panel-v1398,
.univrs-app .univrs-trip-stats-v1398 article,
.univrs-app .univrs-trip-day-v1398,
.univrs-app .uv-trip-custom-v15251 > header,
.univrs-app .uv-trip-list-v15251 article,
.univrs-app .uv-trip-travelers-v15251 article,
.univrs-app .uv-trip-share-card-v15251,
.univrs-app .uv-trip-overview-strategy,
.univrs-app .uv-overview-itinerary-v15254,
.univrs-app .uv-trip-crowd-v15254 {
  border-color: var(--u-line) !important;
  background: color-mix(in srgb, var(--u-card) 92%, transparent) !important;
  color: var(--u-ink) !important;
}

.univrs-app .univrs-trip-hero-v1398 {
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--u-world-accent, var(--u-lagoon)) 18%, transparent), transparent 32%),
    linear-gradient(145deg, color-mix(in srgb, var(--u-card) 96%, transparent), color-mix(in srgb, var(--u-paper) 90%, transparent)) !important;
}

.univrs-app .univrs-trip-day-editor-v1398,
.univrs-app .univrs-trip-day-foot-v1398,
.univrs-app .univrs-trip-day-editor-v1398 .univrs-itinerary-item,
.univrs-app .univrs-trip-day-editor-v1398 input,
.univrs-app .univrs-trip-day-editor-v1398 select,
.univrs-app .univrs-trip-day-editor-v1398 textarea,
.univrs-app .uv-trip-overview-strategy button,
.univrs-app .uv-trip-custom-v15251 button {
  border-color: var(--u-line) !important;
  background: var(--u-paper) !important;
  color: var(--u-ink) !important;
}

.univrs-app .univrs-trip-day-v1398,
.univrs-app .univrs-trip-day-editor-v1398 .univrs-itinerary-item {
  box-shadow: var(--u-shadow-sm) !important;
}

/* Map information order: current overview/crowd, then the complete destination list. */
.univrs-app .univrs-map-explore-v152553 {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 18px 0 24px;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--u-line);
  border-radius: 28px;
  background: color-mix(in srgb, var(--u-card) 92%, transparent);
  box-shadow: var(--u-shadow-sm);
}

.univrs-app .univrs-map-explore-v152553 .univrs-section-head,
.univrs-app .univrs-map-explore-v152553 .univrs-live-map-tools {
  margin: 0 !important;
}

.univrs-app .univrs-map-explore-v152553 .univrs-map-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.univrs-app .univrs-map-result-row.is-unmapped .univrs-map-row-action {
  color: var(--u-muted);
}

.univrs-app .univrs-map-result-row.is-unmapped .univrs-map-row-action::before {
  content: "List only · ";
}

/* Keep Identity controls from forcing a page-wide horizontal scrollbar. */
body.uv-identity-route .univrs-main,
body.uv-identity-route [data-passport-identity-studio],
body.uv-identity-route .univrs-identity-workbench-v1512,
body.uv-identity-route .univrs-identity-controls-v1512 {
  min-width: 0 !important;
  max-width: 100% !important;
}

body.uv-identity-route [data-passport-identity-studio],
body.uv-identity-route .univrs-identity-workbench-v1512 {
  overflow-x: clip !important;
}

body.uv-identity-route button,
body.uv-identity-route label,
body.uv-identity-route h2,
body.uv-identity-route h3,
body.uv-identity-route p,
body.uv-identity-route span,
body.uv-identity-route small {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 1040px) {
  .univrs-app .uv-trip-workspace-nav-v15251 {
    align-items: stretch !important;
    flex-direction: column !important;
  }
  .univrs-app .uv-trip-workspace-nav-v15251 > button {
    align-self: flex-start;
  }
}

@media (max-width: 680px) {
  .univrs-app .univrs-map-explore-v152553 {
    margin-inline: 0;
    padding: 15px;
    border-radius: 22px;
  }
  .univrs-app .univrs-map-explore-v152553 .univrs-map-list {
    max-height: none;
    overflow: visible;
  }
}
