/* ── Wiki Actions: card/teaser 3-dot menus, confirmation modal, hero actions ── */
/* Adapted for AITourPilot design system (Plus Jakarta Sans, gold accent)       */

/* ── Teaser action button (index.html) ── */
.teaser-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted, #aaa);
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
  line-height: 1;
}
.teaser-item:hover .teaser-action-btn { opacity: 1; }
.teaser-action-btn:hover {
  background: rgba(0,0,0,0.05);
  color: var(--ink, #1a1a1a);
}

/* ── Card action button (category pages) ── */
.card-action-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted, #aaa);
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  line-height: 1;
  z-index: 2;
}
.card:hover .card-action-btn { opacity: 1; }
.card-action-btn:hover {
  background: rgba(0,0,0,0.05);
  color: var(--ink, #1a1a1a);
}

/* ── Card restore button (archive page) — always visible ── */
.card-restore-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--gold, #FFB800);
  cursor: pointer;
  font-size: 13px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  color: var(--gold, #FFB800);
  padding: 5px 12px;
  border-radius: 6px;
  line-height: 1;
  z-index: 2;
  transition: background 0.2s, color 0.2s;
}
.card-restore-btn:hover {
  background: var(--gold, #FFB800);
  color: var(--ink, #1a1a1a);
}

/* ── Dropdown menu (appended to body with fixed positioning) ── */
.action-menu {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #eee);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 4px 0;
  z-index: 100;
  min-width: 140px;
}
.action-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: none;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink, #1a1a1a);
  cursor: pointer;
  text-align: left;
}
.action-menu button:hover { background: var(--bg, #fafaf8); }
.action-menu .delete-btn { color: #dc2626; }
.action-menu .delete-btn:hover { background: #fef2f2; }

/* ── Confirmation modal ── */
.confirm-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-modal {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.confirm-modal h3 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink, #1a1a1a);
  margin-bottom: 12px;
}
.confirm-modal p {
  color: var(--text-light, #777);
  font-size: 14px;
  margin-bottom: 8px;
}
.confirm-name {
  color: var(--ink, #1a1a1a);
  font-weight: 500;
  font-size: 13px;
  background: var(--bg, #fafaf8);
  padding: 8px 12px;
  border-radius: 6px;
  margin: 12px 0 20px;
  word-break: break-all;
}
.confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.confirm-cancel,
.confirm-action {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}
.confirm-cancel {
  background: var(--bg, #fafaf8);
  color: var(--ink, #1a1a1a);
}
.confirm-cancel:hover { background: var(--border, #eee); }
.confirm-archive {
  background: var(--gold, #FFB800);
  color: var(--ink, #1a1a1a);
}
.confirm-archive:hover { background: #E5A600; }
.confirm-delete { background: #dc2626; color: #fff; }
.confirm-delete:hover { background: #b91c1c; }
.confirm-restore {
  background: var(--gold, #FFB800);
  color: var(--ink, #1a1a1a);
}
.confirm-restore:hover { background: #E5A600; }

/* ── Hero action buttons (article pages) ── */
.hero-actions {
  position: absolute;
  bottom: 24px;
  right: 32px;
  display: flex;
  gap: 8px;
}
.hero-action-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
}
.hero-action-btn:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.hero-delete-btn:hover {
  background: rgba(220,38,38,0.3);
  color: #fca5a5;
}

/* ── Mobile responsive ── */
@media (max-width: 768px) {
  /* Show action buttons always on mobile (no hover) */
  .teaser-action-btn { opacity: 1; }
  .card-action-btn { opacity: 1; }
  .hero-actions { bottom: 16px; right: 16px; }
}

/* ── Print: hide all action elements ── */
@media print {
  .teaser-action-btn,
  .card-action-btn,
  .card-restore-btn,
  .action-menu,
  .confirm-overlay,
  .hero-actions {
    display: none !important;
  }
}
