/* WondarCore — código propio, no generado. Se puede modificar libremente. */
/* Panel global "Guardados" (botón flotante + drawer), parte del layout — ver _Layout.cshtml y
   guardados-panel.js. Diseño y paleta (#2563eb) tomados de Gonzalo/css/guardados.css. */

/* Pestaña fija que sobresale del borde derecho — mismo diseño que Gonzalo/css/guardados.css
   (.guardados-toggle): pill angosta a media altura que se ensancha al hover mostrando el label. */
.gp-fab {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 44px;
  height: 56px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 12px 0 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.18);
  z-index: 999;
  transition: right 0.3s ease, background 0.15s ease, width 0.25s ease, height 0.25s ease;
}
.gp-fab:hover { background: #1d4ed8; }
.gp-fab:hover:not(.gp-fab--open) { width: 132px; height: 168px; }

.gp-fab svg { flex-shrink: 0; transition: width 0.25s ease, height 0.25s ease; }
.gp-fab:hover:not(.gp-fab--open) svg { width: 44px; height: 44px; }

.gp-fab-label {
  display: none;
  margin-top: 8px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.gp-fab:hover:not(.gp-fab--open) .gp-fab-label { display: block; }

@media (min-width: 481px) {
  .gp-fab--open { right: 380px; }
}

.gp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 30, 0.45);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.gp-overlay--visible { opacity: 1; pointer-events: auto; }

.gp-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 380px;
  max-width: 92vw;
  background: #fff;
  border-left: 3px solid #2563eb;
  z-index: 1002;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.14);
  transform: translateX(105%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.gp-drawer--open { transform: translateX(0); }

.gp-drawer-header {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 1rem 1rem;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.gp-drawer-header-top {
  display: flex;
  justify-content: flex-end;
}

.gp-drawer-close {
  background: none;
  border: none;
  color: #555;
  font-size: 1.3rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.gp-drawer-close:hover { background: #f4f5f7; }

.gp-tabs {
  display: flex;
  width: 100%;
  background: #eff6ff;
  border-radius: 12px;
  overflow: hidden;
}

.gp-tab {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0.7rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(37, 99, 235, 0.5);
  cursor: pointer;
  min-height: 48px;
}

.gp-tab svg { flex-shrink: 0; opacity: 0.5; }

.gp-tab--active { color: #fff; background: #2563eb; }
.gp-tab--active svg { opacity: 1; }

.gp-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 24px;
}

.gp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

/* ── Tableros (Favoritos) — grilla de 2 columnas con foto de portada, igual a
   Gonzalo/css/guardados.css (.fav-board-card/.fav-board-cover). Sin contenido hardcodeado en CSS: la
   portada vacía es un degradé propio, no una foto de stock (a diferencia del mockup original). ── */
.gp-boards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.gp-board-card {
  position: relative;
  background: #f9f9fb;
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gp-board-cover {
  width: 100%;
  aspect-ratio: 1.4;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #e8e8ee;
}

.gp-board-cover--empty {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
}

.gp-board-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-board-count {
  font-size: 0.72rem;
  color: #888;
  margin: 0;
}

.gp-board-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
}

.gp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
  transition: background 0.15s, border-color 0.15s;
}
.gp-item:hover { background: #eff6ff; border-color: #dbeafe; }

.gp-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gp-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.gp-item-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-item-count { font-size: 0.75rem; color: #888; }

.gp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.gp-boards-footer--solo { justify-content: flex-start; }

.gp-btn-primary,
.gp-btn-secondary {
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.gp-btn-primary { background: #2563eb; color: #fff; }
.gp-btn-primary:hover { background: #1d4ed8; }
.gp-btn-secondary { background: #f0f1f5; color: #444; }
.gp-btn-secondary:hover { background: #e4e6ec; }
.gp-btn-primary:disabled, .gp-btn-secondary:disabled { opacity: 0.6; cursor: default; }

.gp-btn-link {
  font-size: 0.8rem;
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.gp-btn-link:hover { text-decoration: underline; }

.gp-empty {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 14px;
  line-height: 1.5;
}

.gp-inline-form {
  display: flex;
  gap: 8px;
  width: 100%;
}

.gp-inline-input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.85rem;
  min-height: 44px;
}
.gp-inline-input:focus { outline: none; border-color: #2563eb; }

/* ── Selector de viajes (abierto desde un pin, ver gpAbrirSelectorViajes) ── */
.gp-pin-titulo {
  font-weight: 800;
  font-size: 1rem;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.gp-pin-sub {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 16px;
  line-height: 1.4;
}

.gp-pin-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.gp-pin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s;
}
.gp-pin-row:hover { background: #eff6ff; }

.gp-pin-check {
  width: 20px;
  height: 20px;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
}

.gp-pin-row-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #222;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Confirmación "agregado a favoritos" (gpAbrirConfirmacionFavorito) — foto real de la miniatura,
   a diferencia de .gp-item-icon (tableros/viajes, sin portada propia todavía). ── */
.gp-item--confirm { border-color: #dbeafe; background: #eff6ff; }

.gp-item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: #e8e8ee;
  flex-shrink: 0;
}

.gp-item-thumb--empty {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
}

/* ── Detalle de tablero inline (gpCargarBoardDetalle) ── */
.gp-board-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 6px 4px;
  margin-bottom: 10px;
  border: none;
  background: none;
  color: #666;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.gp-board-back:hover { color: #2563eb; }

.gp-item-quitar {
  width: 32px;
  height: 32px;
  min-height: 0;
  border-radius: 50%;
  border: none;
  background: #f4f5f7;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.gp-item-quitar:hover { background: #fee2e2; color: #dc2626; }

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 768px)
═══════════════════════════════════════ */
@media (max-width: 768px) {
  .gp-drawer {
    width: 100%;
    max-width: 100%;
  }

  .gp-footer { flex-direction: column; align-items: stretch; }
  .gp-btn-primary, .gp-btn-secondary, .gp-btn-link { justify-content: center; width: 100%; }
}

@media (max-width: 480px) {
  .gp-fab--open {
    opacity: 0;
    pointer-events: none;
  }
}
