/* Custom overrides layered on top of Tailwind. */
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* Toast notifications (title save errors, copy-link confirmation, etc.) */
.nomeet-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: #1C3988;
  color: #fff;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}
.nomeet-toast--error {
  background: #C0392B;
}
.nomeet-toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Owner-only "click title to rename" onboarding bubble on the video page */
.title-hint-bubble {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1C3988;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}
.title-hint-bubble.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.title-hint-bubble::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 16px;
  width: 10px;
  height: 10px;
  background: #1C3988;
  border-radius: 2px;
  transform: rotate(45deg);
}
.title-hint-bubble button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  transition: color 150ms ease;
}
.title-hint-bubble button:hover {
  color: #fff;
}

/* Quick-share icons + native "More" button, in the "Share this recording"
   row of the who-can-view card under the player */
.share-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.share-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}
.share-icon-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.share-icon-btn:focus-visible {
  outline: 2px solid #488BFD;
  outline-offset: 2px;
}

/* AI Insights tabs (Summary / Tasks / Chapters / MoM / Transcript) */
.ai-tab-btn {
  flex-shrink: 0;
  border: none;
  background: none;
  color: rgba(28, 57, 136, 0.5);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}
.ai-tab-btn:hover {
  color: #1C3988;
}
.ai-tab-btn.active {
  color: #488BFD;
  border-bottom-color: #488BFD;
}
.ai-tab-btn:focus-visible {
  outline: 2px solid #488BFD;
  outline-offset: 2px;
}
.ai-tab-panel {
  animation: ai-fade-in 150ms ease;
}
@keyframes ai-fade-in {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Task checklist (Tasks tab) */
.ai-task-item {
  border: 1px solid rgba(28, 57, 136, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.ai-task-item:hover {
  background-color: #F1F6FC;
}
.ai-task-item.completed .ai-task-title {
  text-decoration: line-through;
  color: rgba(28, 57, 136, 0.45);
}
.ai-task-checkbox {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #488BFD;
  cursor: pointer;
  flex-shrink: 0;
}

/* Chapters list */
.ai-chapter-item {
  border: 1px solid rgba(28, 57, 136, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}
.ai-chapter-item:hover {
  background-color: #F1F6FC;
  transform: translateX(1px);
}

/* Grid view for recordings on /library (list view is just the plain
   Tailwind classes already on .file-row/.recordings-list in
   recordingRow.ejs/library.ejs). Scoped under #library-content.view-grid so
   these selectors out-specificity the single Tailwind utility classes they
   override, regardless of stylesheet load order — see app.js's
   setLibraryView(). */
#library-content.view-grid .recordings-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
#library-content.view-grid .file-row {
  position: relative;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 0 0 12px;
  border: 1px solid rgba(28, 57, 136, 0.1);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
/* The thumbnail fills the card's full width at a 16:9 ratio, like a
   Loom/Drive/Vimeo library card — list view keeps the smaller fixed-width
   version from recordingRow.ejs's own Tailwind classes. */
#library-content.view-grid .file-row .file-icon {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}
#library-content.view-grid .file-row .file-icon svg {
  width: 34px;
  height: 34px;
}
#library-content.view-grid .file-row .file-info {
  width: 100%;
  padding: 10px 12px 0;
}
#library-content.view-grid .file-row .file-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}
#library-content.view-grid .file-row .file-kebab-wrap {
  position: absolute;
  top: 8px;
  right: 8px;
}
/* Sits on top of arbitrary thumbnail imagery, not the flat tinted
   background it has in list view — needs its own contrast. */
#library-content.view-grid .file-row .kebab-btn {
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}
#library-content.view-grid .file-row .kebab-btn:hover {
  background: rgba(0, 0, 0, 0.65);
}

/* View-toggle icon buttons (list/grid) next to "New folder" */
.view-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(28, 57, 136, 0.5);
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.view-toggle-btn:hover {
  color: #1C3988;
}
.view-toggle-btn.active {
  background: #fff;
  color: #1C3988;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Generic small "copy" action buttons used across AI tabs */
.ai-copy-btn {
  font-size: 12px;
  font-weight: 600;
  color: #488BFD;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: background-color 150ms ease, opacity 150ms ease;
}
.ai-copy-btn:hover {
  background-color: rgba(72, 139, 253, 0.1);
}
