/* WondarCore — código propio, no generado. Se puede modificar libremente. */
/* Página /{idioma}/favoritos (tableros de favoritos + itinerarios). Reusa .destino-wrapper, .destino-card,
   .destino-card-title, .val-btn, .comparacion-sub, .dest-card-home, .exp-card, .card-* y
   .search-dropdown/.search-result (definidos en destino-publico.css / pais-publico.css / layout.css)
   — acá solo van las clases fp-* específicas de esta página: switch de tabs, tableros/viajes en
   grilla, modales y la línea de tiempo de un viaje. Sin imágenes ni contenido hardcodeado (esta
   página no tiene fotos propias: las de las tarjetas se setean desde JS con datos reales de la API). */

/* ── HERO + SWITCH DE TABS — mismo gradiente que .red-hero (Gonzalo/favoritos.css .fp-hero-card) ── */
.fp-hero {
  gap: 1.25rem;
  text-align: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b69 60%, #1a1a2e 100%);
  border-radius: 20px;
  padding: 2.4rem 2.5rem;
  box-shadow: none;
}

/* Mismo tamaño/peso que .red-hero .destino-card-title y .vs-hero-title (Gonzalo/favoritos.css
   .fp-hero-title) — acá faltaba este override, por eso quedaba con el tamaño genérico de
   .destino-card-title (1.6rem) en vez del de los demás banners morados del sitio. */
.fp-hero .destino-card-title { color: #fff; font-size: 1.9rem; font-weight: 800; }
.fp-hero .comparacion-sub { color: #bfdbfe; font-size: 0.9rem; line-height: 1.65; max-width: 640px; margin: 0 auto; }

.fp-hero-top {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fp-switch {
  display: flex;
  /* Sin wrap a propósito (Agustin, 2026-07-27): "Favoritos"/"Itinerarios" tienen que quedar siempre
     lado a lado, nunca uno arriba del otro. Antes tenía flex-wrap:wrap y .fp-switch-btn no podía
     encogerse por debajo de su ancho de contenido (min-width:auto, default de flexbox), así que en
     mobile el texto forzaba el wrap del contenedor entero. */
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  /* min-width (2026-08-01): sin ancho propio, el contenedor se autoajusta al contenido de los
     botones — medido en vivo, ese contenido queda ~2px corto para "Itinerarios" en CUALQUIER
     tamaño de pantalla (no es un problema de mobile, se veía igual en un monitor 4K a 1920px de
     viewport). El min-width de la media query ≤768px no alcanzaba porque nunca se aplicaba en
     desktop. */
  min-width: 300px;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 6px;
}

.fp-switch-btn {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1rem;
  min-height: 46px;
  border-radius: 10px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

/* Si el texto todavía no entra en pantallas muy angostas, se trunca en vez de forzar el wrap del botón. */
.fp-switch-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fp-switch-btn--active {
  background: #2563eb;
  color: white;
}

@media (max-width: 600px) {
  .fp-hero { padding: 1.6rem 1rem; }
  .fp-hero .destino-card-title { font-size: 1.6rem; }
  .fp-hero .comparacion-sub { font-size: 0.85rem; }
}

/* ── SECCIONES ── */
.fp-section {
  margin-top: 1.5rem;
}

.fp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.fp-section-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
}

.fp-empty {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  padding: 1.5rem 0;
}

/* ── GRILLA DE TABLEROS / VIAJES ──
   .fp-boards-grid: grilla fija (no se usa más directo, queda por compatibilidad).
   .fp-grid: grilla genérica (overview expandida y cards del detalle), mismo criterio que Gonzalo.
   .cercanos-track/.cercanos-nav/.cercanos-btn ya están definidos en destino-publico.css (compartidos
   con el resto del sitio) — acá solo se ajusta el ancho de cada .fp-board dentro del carrusel. ── */
.fp-boards-grid,
.fp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 0;
}

.fp-boards-track.cercanos-track .fp-board {
  flex: 0 0 calc(25% - 12px);
  min-width: 0;
}

.fp-board {
  position: relative;
  background: white;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.fp-board:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.fp-board-cover {
  height: 110px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fp-board-cover--empty {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: #7c3aed;
}

.fp-board-cover--empty svg { width: 28px; height: 28px; opacity: 0.6; }

.fp-board-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-board-count {
  font-size: 0.78rem;
  color: #666;
}

.fp-board-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  min-height: 0;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.fp-board-delete:hover { background: #fee2e2; color: #dc2626; }

.fp-viaje-tile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.5rem;
}

.fp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 50px;
}

.fp-chip--destino { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.fp-chip--experiencia { background: rgba(22, 163, 74, 0.1); color: #16a34a; }

.fp-boards-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.fp-boards-footer--solo { justify-content: flex-start; }

/* ── BOTONES ── */
.fp-btn-primary,
.fp-btn-ghost,
.fp-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  min-height: 44px;
  border-radius: 50px;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}

.fp-btn-primary:hover:not(:disabled), .fp-btn-danger:hover:not(:disabled) { opacity: 0.9; }
.fp-btn-ghost:hover { background: #f4f5f7; }
.fp-btn-primary:disabled, .fp-btn-danger:disabled { opacity: 0.6; cursor: default; }

.fp-btn-primary { background: #2563eb; color: white; }
.fp-btn-ghost { background: #f0f1f5; color: #444; }
.fp-btn-danger { background: #dc2626; color: white; }

/* ── DETALLE DE TABLERO / VIAJE ── */
.fp-board-detail-header {
  margin-bottom: 1.25rem;
}

.fp-board-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 6px 4px;
  border: none;
  background: none;
  color: #666;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0.6rem;
}

.fp-board-back:hover { color: #2563eb; }

.fp-board-detail-titlerow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.fp-board-detail-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a2e;
}

/* Título del viaje el doble de grande que el de un tablero, a pedido de Gonzalo. */
.fp-board-detail-title--viaje {
  font-size: 2.2rem;
}

/* ── Detalle de tablero/viaje: cards a la izquierda, mapa Leaflet sticky a la derecha ── */
.fp-board-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.fp-board-detail-cards .fp-grid { margin-bottom: 0; }

.fp-board-detail-mapwrap {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.fp-board-map {
  height: 480px;
  border-radius: 16px;
  overflow: hidden;
  background: #dbeafe;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.fp-board-detail-desc {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.2rem;
}

.fp-board-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.fp-board-edit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 50px;
  border: 1.5px solid #ddd;
  background: white;
  color: #444;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.fp-board-edit:hover { border-color: #bbb; }

.fp-board-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 50px;
  border: none;
  background: #16a34a;
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.fp-board-copy:hover { opacity: 0.9; }
.fp-board-copy:disabled { opacity: 0.6; cursor: default; }

/* Resumen de "Wondar IA" (WondarCore.IaPublico.cs) — solo aparece si el viaje se armó con ese
   flujo. Va arriba de la línea de tiempo, debajo del header del viaje. */
.fp-wondaria-box {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
}
.fp-wondaria-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}
.fp-wondaria-texto {
  font-size: 0.9rem;
  color: #1a1a2e;
  line-height: 1.5;
}

/* Público + Adjuntos + Notas — 3 columnas en una sola fila (pedido de Agustin, 2026-07-28: apiladas
   ocupaban demasiado lugar), mismo estilo de etiqueta para los 3 campos (ver fpRenderSeccionViajeGlobal). */
.fp-viaje-campos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.fp-viaje-campo-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.35rem;
}

.fp-pdf-modal-check-row { margin-bottom: 0.4rem; }
.fp-pdf-modal-check-row:last-of-type { margin-bottom: 1rem; }

.fp-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  cursor: pointer;
}

.fp-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Versión compacta: adentro de la grilla de 3 columnas, no necesita el mismo alto que un tap target
   de primer nivel (el checkbox nativo ya es fácil de tocar). */
.fp-checkbox-label--compact { min-height: 0; }

/* Modo solo lectura (viaje Publico visto por otro usuario): el checkbox se reemplaza por esta
   etiqueta fija — no hay nada que tocar. */
.fp-viaje-publico-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(37,99,235,0.1);
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
}

.fp-viaje-campo .fp-modal-textarea { min-height: 44px; }

/* Adjuntos (PDF/JPG/DOC/DOCX) — bloque propio en el detalle del viaje (AdjuntoViaje) y dentro del
   modal de editar ítem (AdjuntoViajeDetalle), mismo markup para los dos (ver fpRenderAdjuntosSection). */
.fp-adjuntos-section {
  margin: 0.9rem 0 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #f7f8fa;
  border: 1.5px solid #e5e7eb;
}

.fp-adjuntos-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.fp-adjuntos-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fp-adjuntos-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 50px;
  border: 1.5px solid #ddd;
  background: white;
  color: #444;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.fp-adjuntos-add-btn:hover { border-color: #bbb; }

.fp-adjuntos-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.fp-adjuntos-vacio {
  font-size: 0.82rem;
  color: #888;
}

.fp-adjuntos-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fp-adjuntos-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: white;
  border: 1px solid #e5e7eb;
}

.fp-adjuntos-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  min-width: 0;
}
.fp-adjuntos-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fp-adjuntos-link:hover { text-decoration: underline; }

.fp-adjuntos-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #999;
  cursor: pointer;
  flex-shrink: 0;
}
.fp-adjuntos-remove:hover { color: #dc2626; }

/* Presupuesto (GastosViajeGrid) — vive en la columna de la derecha, debajo del mapa (pedido de
   Agustin, 2026-07-28), compartiendo esa columna sticky junto con los totalizadores. */
.fp-presupuesto-section {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #f7f8fa;
  border: 1.5px solid #e5e7eb;
}

.fp-presupuesto-head {
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.fp-presupuesto-title { font-size: 1.1rem; }

.fp-gastos-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.fp-gasto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: white;
  border: 1.5px solid #eee;
}

.fp-gasto-info { min-width: 0; }

/* Clases propias (no comparten selector con .fp-item-edit/.fp-item-delete de la línea de tiempo) —
   fpWireViajeItemEvents y fpWirePresupuestoEvents hacen querySelectorAll sobre el mismo contenedor,
   así que si compartieran clase se les engancharían los dos handlers al mismo botón. */
.fp-gasto-edit,
.fp-gasto-delete {
  width: 36px;
  height: 36px;
  min-height: 0;
  border-radius: 50%;
  border: none;
  background: #f4f5f7;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.fp-gasto-edit:hover { background: #e0e7ff; color: #2563eb; }
.fp-gasto-delete:hover { background: #fee2e2; color: #dc2626; }

.fp-gasto-monto {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
}

.fp-gasto-notas {
  font-size: 0.82rem;
  color: #666;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.fp-gasto-adjuntos-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.25rem;
}

/* Totalizadores — columna de la derecha, debajo del presupuesto. */
.fp-totales-section {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #f7f8fa;
  border: 1.5px solid #e5e7eb;
}

.fp-totales-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 0.88rem;
  color: #444;
  border-bottom: 1px solid #e5e7eb;
}

.fp-totales-row:last-child { border-bottom: none; }

.fp-totales-row--final {
  margin-top: 0.3rem;
  padding-top: 0.75rem;
  border-top: 1.5px solid #ddd;
  border-bottom: none;
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a2e;
}

.fp-card-wrap { display: block; }

.fp-remove-btn:hover { color: #dc2626; }

/* ── LÍNEA DE TIEMPO DE UN VIAJE — fecha + riel + tarjeta, con drag&drop y anidado ── */
.fp-timeline-hint {
  font-size: 0.8rem;
  color: #888;
  margin: 0 0 1rem;
}

.fp-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Mientras se arrastra, soltar en el fondo (fuera de cualquier tarjeta puntual) también acepta el
   drop, para poder sacar una experiencia anidada aunque no haya otra tarjeta suelta a mano. */
.fp-timeline--drop-loose {
  outline: 2px dashed #16a34a;
  outline-offset: 8px;
  border-radius: 12px;
}

.fp-timeline-row {
  display: grid;
  grid-template-columns: 78px 22px 1fr;
  gap: 12px;
}

.fp-timeline-date {
  text-align: right;
  padding-top: 2px;
}
.fp-timeline-date span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a1a2e;
}
.fp-timeline-date small {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  color: #999;
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.fp-timeline-row--destino .fp-timeline-date small { color: #7c3aed; }
.fp-timeline-row--experiencia .fp-timeline-date small { color: #16a34a; }

.fp-timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
}
.fp-timeline-rail::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: -12px;
  width: 2px;
  background: #e5e5ea;
}
.fp-timeline-row:last-child .fp-timeline-rail::before { display: none; }

.fp-timeline-node {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px currentColor;
  margin-top: 3px;
}
.fp-timeline-node--destino { background: #7c3aed; color: #7c3aed; }
.fp-timeline-node--experiencia { background: #16a34a; color: #16a34a; }

.fp-timeline-content {
  padding-bottom: 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fp-item-card {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  border-left: 4px solid #ddd;
  cursor: grab;
}

.fp-item-card--destino { border-left-color: #7c3aed; }
.fp-item-card--experiencia { border-left-color: #16a34a; }

.fp-item-card--dragging { opacity: 0.45; }

/* Etiqueta flotante con lo que va a pasar si soltás ahí (texto en data-drop-hint desde el JS). */
.fp-item-card[data-drop-hint]::after {
  content: attr(data-drop-hint);
  position: absolute;
  left: 50%;
  top: -13px;
  transform: translateX(-50%);
  z-index: 5;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  background: #2563eb;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  pointer-events: none;
}

.fp-item-card--dragover-before { box-shadow: 0 -3px 0 0 #2563eb; }
.fp-item-card--dragover-after {
  box-shadow: 0 3px 0 0 #2563eb;
}
.fp-item-card--dragover-after::after { top: auto; bottom: -13px; }

/* Experiencias anidadas adentro de la tarjeta de su destino real (fpAgruparPorDestino/
   fpTarjetaExperienciaAnidada) — mismo espíritu que Gonzalo/favoritos.css (.fp-item-card--nested):
   fondo verde bien suave para que se note que "viven adentro" del destino, sin ser un ítem propio
   de la línea de tiempo (por eso no llevan su propio riel/fecha grande, ni son draggable). */
.fp-item-card-hijos {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.fp-item-card-nested {
  background: rgba(22, 163, 74, 0.06);
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.fp-item-nested-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #16a34a;
  flex-shrink: 0;
}

.fp-item-comentario {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin: 0.5rem 0 0;
}

.fp-item-adjuntos-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: #888;
  margin: 0.35rem 0 0;
}

.fp-item-add-exp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f4f5f7;
  border: none;
  border-radius: 50px;
  color: #16a34a;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  margin-top: 0.7rem;
  min-height: 36px;
}
.fp-item-add-exp:hover { background: #eaeaea; }

.fp-item-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.fp-item-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.fp-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #eef1f6;
  flex-shrink: 0;
}

.fp-item-thumb--empty {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
}

.fp-item-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #1a1a2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-item-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.fp-item-edit,
.fp-item-delete {
  width: 36px;
  height: 36px;
  min-height: 0;
  border-radius: 50%;
  border: none;
  background: #f4f5f7;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.fp-item-edit:hover { background: #e0e7ff; color: #2563eb; }
.fp-item-delete:hover { background: #fee2e2; color: #dc2626; }

/* Ícono "abrir en Google Maps" — vive al lado de fp-item-card-actions, visible para cualquiera
   (dueño o visitante en modo solo lectura), no solo cuando fpViajeEsDuenio. */
.fp-item-maps-link {
  width: 36px;
  height: 36px;
  min-height: 0;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: #f4f5f7;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.fp-item-maps-link:hover { background: #e0e7ff; color: #2563eb; }

.fp-item-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: white;
  padding: 3px 9px;
  border-radius: 50px;
  margin-top: 0.6rem;
}

.fp-item-tag--destino { background: #7c3aed; }
.fp-item-tag--experiencia { background: #16a34a; }

.fp-item-fechas {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.4rem;
}

.fp-item-fechas--vacio { color: #999; font-style: italic; }

.fp-item-valor {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-top: 0.25rem;
}

/* ── MODALES ── */
.fp-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,20,0.5);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.fp-modal-overlay--open { display: flex; }

.fp-modal {
  background: white;
  border-radius: 16px;
  padding: 1.75rem;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.fp-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  min-height: 0;
  border-radius: 50%;
  border: none;
  background: #f4f5f7;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.fp-modal-close:hover { background: #e5e7eb; }

.fp-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.4rem;
  padding-right: 1.5rem;
}

.fp-modal-sub {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.fp-modal-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.35rem;
  margin-top: 0.9rem;
}

.fp-modal-label:first-of-type { margin-top: 0; }

.fp-modal-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid #ddd;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1a1a2e;
  background: white;
}

.fp-modal-input:focus {
  outline: none;
  border-color: #2563eb;
}

.fp-modal-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid #ddd;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1a1a2e;
  background: white;
  resize: vertical;
  min-height: 70px;
}

.fp-modal-textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.fp-modal-daterow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.fp-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

/* Sugerencia de experiencia (mejor puntaje del destino) — debajo de "Agregar", ver
   fpMostrarSugerenciaExperiencia en favoritos-publico.js. */
.fp-suggestion-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #888;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.fp-suggestion-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: #f8f8fb;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.fp-suggestion-card:hover { border-color: #2563eb; background: #eef2ff; }

.fp-suggestion-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: #eef1f6;
  flex-shrink: 0;
}

.fp-suggestion-name {
  flex: 1;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: #1a1a2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-suggestion-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #d97706;
  flex-shrink: 0;
}
.fp-suggestion-score svg { fill: #d97706; }

.fp-modal--confirm .fp-modal-title,
.fp-modal--confirm .fp-modal-sub { padding-right: 0; }

/* ── BUSCADOR DENTRO DEL MODAL DE ÍTEM ── */
.fp-item-modal-search-wrap {
  position: relative;
}

.fp-item-modal-search-wrap .search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
}

.fp-item-modal-chip-wrap {
  margin-top: 0.6rem;
}

.fp-item-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eef2ff;
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 10px 8px 14px;
  border-radius: 50px;
}

.fp-item-chip button {
  width: 22px;
  height: 22px;
  min-height: 0;
  border-radius: 50%;
  border: none;
  background: rgba(37,99,235,0.15);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ── DETALLE DE VIAJE (ITINERARIO) — rediseño 2026-07-31 (pedido de Agustin): ya no es dos columnas
   de punta a punta, cada sección ocupa el ancho completo salvo la última fila (presupuesto + panel
   público/adjuntos/notas, ver .fp-viaje-bottom-grid). El banner morado (.fp-hero) se oculta acá vía
   JS (fpSetHeroVisible) — no tiene sentido repetir el switch de tabs estando ya adentro de un viaje. */
.fp-viaje-titlebox {
  flex: 1 1 auto;
  min-width: 0;
}

.fp-viaje-titulo-input {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 8px;
}
.fp-viaje-titulo-input:hover { background: #f4f5f7; }
.fp-viaje-titulo-input:focus { outline: none; background: #eef2ff; }

.fp-viaje-fecha-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0.3rem;
}
.fp-viaje-fecha-text { font-size: 0.85rem; color: #666; }
.fp-viaje-fecha-edit {
  width: 30px;
  height: 30px;
  min-height: 0;
  border-radius: 50%;
  border: none;
  background: #f0f1f5;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.fp-viaje-fecha-edit:hover { background: #e0e7ff; color: #2563eb; }

/* Mapa decorativo, ancho completo, en su propia fila (ya no comparte columna sticky con nada). */
.fp-viaje-map-row {
  position: relative;
  margin-bottom: 1.5rem;
}
.fp-viaje-map {
  height: 300px;
  border-radius: 16px;
  overflow: hidden;
  background: #dbeafe;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.fp-viaje-map-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
  width: 36px;
  height: 36px;
  min-height: 0;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.92);
  color: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
}
.fp-viaje-map-fullscreen-btn:hover { background: #fff; }
.fp-viaje-map-row--fullscreen .fp-viaje-map { height: 100vh; border-radius: 0; }

/* Fila de alta rápida: buscador con autocomplete + fechas + agregar, todo en una línea (reemplaza el
   botón "+ Agregar" que abría un modal aparte). */
.fp-add-item-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.fp-add-item-search-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
}
.fp-add-item-input,
.fp-add-item-date {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid #ddd;
  font-size: 0.88rem;
  color: #1a1a2e;
  background: #fff;
}
.fp-add-item-date { flex: 0 1 150px; }
.fp-add-item-date:disabled { background: #f2f2f5; color: #999; cursor: not-allowed; }
.fp-add-item-input:focus,
.fp-add-item-date:focus { outline: none; border-color: #2563eb; }
.fp-add-item-btn { flex-shrink: 0; }

/* Línea de tiempo — ahora ancho completo, ya no comparte grilla con el mapa (refactor de
   comportamiento pendiente aparte, esto solo la ensancha). */
.fp-viaje-timeline-wrap { margin-bottom: 1.5rem; }

/* Presupuesto (izquierda) + Público/Adjuntos/Notas (derecha) — única sección que vuelve a las dos
   columnas, al final del detalle. */
.fp-viaje-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.fp-viaje-bottom-grid .fp-adjuntos-section { margin: 0; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .fp-boards-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .fp-board-cover { height: 90px; }

  .fp-switch { width: 100%; max-width: none; min-width: 300px; }
  .fp-switch-btn { flex: 1 1 50%; justify-content: center; gap: 4px; padding: 0.7rem 0.3rem; font-size: 0.78rem; }
  /* El ícono es decorativo — en pantallas angostas se saca para dejarle todo el ancho al texto (antes
     "Itinerarios" quedaba truncado en "Itinerari..." incluso con el texto reducido, ver captura real
     de Agustin, 2026-07-31). */
  .fp-switch-btn svg { display: none; }

  .fp-board-detail-titlerow { flex-direction: column; align-items: stretch; }
  .fp-board-detail-actions { justify-content: flex-start; }
  .fp-board-detail-title--viaje { font-size: 1.7rem; }

  .fp-board-detail-layout { grid-template-columns: 1fr; }
  .fp-board-detail-mapwrap { position: static; }
  .fp-board-map { height: 280px; }

  .fp-viaje-map { height: 220px; }
  .fp-add-item-row { flex-direction: column; align-items: stretch; }
  .fp-add-item-date { flex: 1 1 auto; }
  .fp-viaje-bottom-grid { grid-template-columns: 1fr; }

  .fp-timeline-row { grid-template-columns: 62px 18px 1fr; gap: 8px; }
  .fp-timeline-date span { font-size: 0.72rem; }

  .fp-modal-daterow { grid-template-columns: 1fr; }

  .fp-item-card-title { white-space: normal; }

  .fp-viaje-campos-grid { grid-template-columns: 1fr; gap: 0.9rem; }
}

@media (max-width: 480px) {
  .fp-boards-grid { grid-template-columns: 1fr 1fr; }
}
