/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ── Author popover + tag chip animations ───────────────────────── */

@keyframes popover-in {
  from { opacity: 0; transform: translateY(-5px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.popover-enter { animation: popover-in 160ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes tag-in {
  from { opacity: 0; transform: scale(0.72); }
  to   { opacity: 1; transform: scale(1); }
}
.tag-enter { animation: tag-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

@keyframes tag-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.68); }
}
.tag-exit { animation: tag-out 180ms cubic-bezier(0.4, 0, 1, 1) forwards; pointer-events: none; }

/* × button inside tag chip — slides in on hover */
.tag-remove {
  display: inline-flex;
  align-items: center;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  margin-left: 0;
  transition: max-width 160ms ease, opacity 120ms ease, margin-left 160ms ease;
}
.tag-chip:hover .tag-remove {
  max-width: 18px;
  opacity: 1;
  margin-left: 2px;
}

/* Dashed "Add tag" chip */
.add-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1.5px dashed #C9D2DE;
  color: #5B6B7F;
  font-size: 14px;
  line-height: 1rem;
  cursor: pointer;
  transition: border-color 140ms, color 140ms, background-color 140ms, transform 140ms;
  background: transparent;
}
.add-chip:hover  { border-color: #5B6B7F; color: #0E1A2B; background-color: #EFF2F7; transform: scale(1.12); }
.add-chip:active { transform: scale(0.95); }

/* Inline input morphs in from the + spot */
@keyframes input-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.tag-input-enter { animation: input-in 160ms ease-out forwards; }

/* Inline tag pills in author chip — dim on parent hover to hint they're interactive */
.inline-tag-pill { transition: opacity 120ms; }
.author-btn:hover .inline-tag-pill { opacity: 0.8; }
