/* =====================================================================
 * Prompt-Templates – Navigation & Control Styles
 * Vorschläge #2 (History – kein eigenes CSS nötig), #4, #6, #9.
 * Nutzt die Liquid-Glass-Variablen aus style.css für Theme-Konsistenz.
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * #4 · Breadcrumb-Sprungvorschau (Chevron + Popover)
 * ------------------------------------------------------------------- */
.breadcrumb-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0 1px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--fg-3, #8b90a0);
  cursor: pointer;
  vertical-align: middle;
  flex: 0 0 auto;
  transition: background 0.16s, color 0.16s, transform 0.16s;
  -webkit-tap-highlight-color: transparent;
}
.breadcrumb-jump:hover { background: rgba(255, 255, 255, 0.1); color: var(--fg-1, #fff); }
.breadcrumb-jump:active { transform: scale(0.9); }

.breadcrumb-popover {
  position: fixed;
  z-index: 2200;
  min-width: 200px;
  max-width: min(320px, 86vw);
  max-height: min(60vh, 420px);
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  background: var(--glass-highlight), var(--glass-refraction), var(--glass-bg, rgba(18, 22, 42, 0.92));
  border: 1px solid var(--glass-stroke, rgba(255, 255, 255, 0.12));
  border-top-color: var(--glass-stroke-top, rgba(255, 255, 255, 0.22));
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  box-shadow: var(--shadow-1, 0 12px 36px rgba(0, 0, 0, 0.48));
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top left;
  transition: opacity 0.18s var(--ease-smooth, ease), transform 0.18s var(--ease-smooth, ease);
}
.breadcrumb-popover.is-open { opacity: 1; transform: none; }
.breadcrumb-popover-head {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-3, #8b90a0);
  padding: 6px 10px 4px;
}
.breadcrumb-popover-list { display: flex; flex-direction: column; gap: 2px; }
.breadcrumb-popover-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--fg-1, #fff);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s, transform 0.12s;
}
.breadcrumb-popover-item:hover { background: rgba(94, 92, 230, 0.18); }
.breadcrumb-popover-item:active { transform: scale(0.98); }
.breadcrumb-popover-item .bp-folder { color: var(--acc-teal, #5ac8fa); flex: 0 0 auto; }
.breadcrumb-popover-item .bp-title { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb-popover-item .bp-count {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--fg-3, #8b90a0);
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 7px;
}

/* ---------------------------------------------------------------------
 * #6 · Tastatur-Fokusring im Karten-Grid
 * ------------------------------------------------------------------- */
.card.kbd-focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--acc-1, #5e5ce6),
              0 0 28px rgba(94, 92, 230, 0.45),
              var(--shadow-1, 0 12px 36px rgba(0, 0, 0, 0.48)) !important;
  border-color: var(--acc-1, #5e5ce6) !important;
  transform: translateY(-4px) scale(1.015);
  z-index: 5;
  transition: box-shadow 0.18s var(--ease-smooth, ease), transform 0.18s var(--ease-smooth, ease);
}
@media (prefers-reduced-motion: reduce) {
  .card.kbd-focus { transform: none; }
}

/* ---------------------------------------------------------------------
 * #9 · Karten-Wischgesten (Touch)
 * ------------------------------------------------------------------- */
.cards-container .card { position: relative; }
.card-content-wrapper { position: relative; z-index: 2; will-change: transform; }
/* Nur WÄHREND der Wischgeste deckt der Inhalt den dahinterliegenden Aktionstray
   ab. Im Normalzustand bleibt der Wrapper transparent (Glas-Optik unverändert). */
.card.swipe-left-active .card-content-wrapper,
.card.swipe-actions-open .card-content-wrapper {
  background: var(--glass-bg, rgba(18, 22, 42, 0.92));
  border-radius: inherit;
}

/* Aktionstray hinter dem Karteninhalt (wird beim Links-Wischen sichtbar) */
.card-swipe-tray {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 14px;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-smooth, ease);
}
.card.swipe-left-active .card-swipe-tray,
.card.swipe-actions-open .card-swipe-tray { opacity: 1; pointer-events: auto; }
.card.swipe-actions-open .card-content-wrapper {
  transform: translateX(-96px);
  transition: transform 0.26s var(--timing-function-bounce, ease);
}
.cst-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}
.cst-btn:active { transform: scale(0.88); }
.cst-edit { background: linear-gradient(135deg, #32d74b, #5ac8fa); }
.cst-move { background: linear-gradient(135deg, #bf5af2, #5e5ce6); }
.cst-delete { background: linear-gradient(135deg, #ff453a, #ff6450); }

/* Favoriten-Flash beim Rechts-Wischen */
.card-fav-flash {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--favorite-color, #ffd60a);
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(255, 214, 10, 0.18), transparent 70%);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.32s var(--timing-function-bounce, ease);
}
.card-fav-flash.show { opacity: 1; transform: scale(1); }

/* Während aktiver Rechts-Wischbewegung: dezenter Favoriten-Glow am Kartenrand */
.card.swipe-right-active { box-shadow: -8px 0 0 -2px var(--favorite-color, #ffd60a) inset, var(--shadow-1); }

@media (prefers-reduced-motion: reduce) {
  .card.swipe-actions-open .card-content-wrapper,
  .card-fav-flash { transition: none; }
}
