/* Shared Media Catalog UI (`matelli-media-core`)
 * Watched status dots, hover-only three-dot action menus, owner selection/bulk edit mode,
 * and shared list-picker / new-list modals.
 */

/* ── Watched Status Dot (Top-Left of Poster / Title) ─────────────────────────── */
.mc-watch-dot {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.mc-watch-dot.is-unwatched {
  background: #f59e0b;
  border: 1.5px solid rgba(13, 17, 23, 0.85);
}

.mc-watch-dot.is-watched {
  background: #0b0e13;
  border: 1.5px solid rgba(230, 237, 243, 0.72);
}

.mc-watch-dot.is-started {
  background: conic-gradient(#f59e0b 0deg 180deg, #0b0e13 180deg 360deg);
  border: 1.5px solid rgba(245, 158, 11, 0.92);
}

.mc-watch-dot-inline {
  display: inline-block;
  position: static;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 6px;
}

/* ── Card Title Row + Hover-Visible Three-Dot Action Menu ───────────────────── */
.mc-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  margin-top: 8px;
  position: relative;
}

.mc-card-title-row .mc-card-title-text {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-width: 0;
  flex: 1 1 auto;
}

.mc-card-more-btn {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: -2px;
  margin-right: -4px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.movie-card:hover .mc-card-more-btn,
.movie-card:focus-within .mc-card-more-btn,
.show-card:hover .mc-card-more-btn,
.show-card:focus-within .mc-card-more-btn,
.mc-card-more-btn.is-open,
.mc-card-more-btn:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.mc-card-more-btn:hover,
.mc-card-more-btn.is-open {
  background: var(--surface-2, #1c2128);
  border-color: var(--border-strong, #30363d);
  color: var(--text);
}

.mc-action-menu {
  position: fixed;
  z-index: 420;
  min-width: 196px;
  max-width: 250px;
  background: var(--surface, #161b22);
  border: 1px solid var(--border-strong, #30363d);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.58);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mc-action-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text, #e6edf3);
  font-size: 0.81rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.mc-action-menu-item:hover {
  background: rgba(88, 166, 255, 0.13);
  color: #ffffff;
}

.mc-action-menu-item.danger {
  color: #ff7b72;
}

.mc-action-menu-item.danger:hover {
  background: rgba(248, 81, 73, 0.16);
}

.mc-action-menu-sep {
  height: 1px;
  background: var(--border, #262c36);
  margin: 4px 6px;
}

/* ── Owner Selection / Bulk Edit Mode ───────────────────────────────────────── */
.mc-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 9px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.14), rgba(22, 27, 34, 0.96));
  border: 1px solid rgba(88, 166, 255, 0.42);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.34);
  position: sticky;
  top: 8px;
  z-index: 45;
  backdrop-filter: blur(8px);
}

.mc-bulk-bar.hidden {
  display: none;
}

.mc-bulk-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-bulk-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f0f6fc;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.22);
  border: 1px solid rgba(88, 166, 255, 0.45);
}

.mc-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-strong, #30363d);
  background: var(--surface, #161b22);
  color: var(--text, #e6edf3);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.mc-bulk-btn:hover:not(:disabled) {
  background: var(--surface-2, #1c2128);
  border-color: var(--accent, #58a6ff);
}

.mc-bulk-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.mc-bulk-btn.primary {
  background: rgba(88, 166, 255, 0.2);
  border-color: rgba(88, 166, 255, 0.55);
  color: #ffffff;
}

.mc-bulk-btn.primary:hover:not(:disabled) {
  background: rgba(88, 166, 255, 0.32);
}

.mc-select-check {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: rgba(13, 17, 23, 0.72);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.is-selected .mc-select-check {
  background: var(--accent, #58a6ff);
  border-color: #ffffff;
  transform: scale(1.06);
}

.mc-select-mode .movie-card,
.mc-select-mode .show-card {
  cursor: pointer;
  user-select: none;
}

.mc-select-mode .movie-card.is-selected .movie-poster-slot,
.mc-select-mode .show-card.is-selected .movie-poster-slot {
  outline: 2.5px solid var(--accent, #58a6ff);
  outline-offset: 2px;
}

.mc-select-mode .movie-hover-actions {
  display: none !important;
}

/* ── Shared Modal (Add to List / Add to New List) ────────────────────────────── */
.mc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(1, 4, 9, 0.74);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.mc-modal-card {
  width: 100%;
  max-width: 440px;
  max-height: 82vh;
  overflow-y: auto;
  background: var(--surface, #161b22);
  border: 1px solid var(--border-strong, #30363d);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.mc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mc-modal-head h3 {
  margin: 0;
  font-size: 1rem;
  color: #f0f6fc;
}

.mc-modal-sub {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--muted, #8b949e);
}

.mc-list-pick-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  max-height: 290px;
  overflow-y: auto;
}

.mc-list-pick-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #262c36);
  background: var(--bg, #0d1117);
  color: var(--text, #e6edf3);
  font-size: 0.84rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.mc-list-pick-row:hover {
  border-color: var(--accent, #58a6ff);
  background: rgba(88, 166, 255, 0.1);
}

.mc-list-pick-meta {
  font-size: 0.74rem;
  color: var(--muted, #8b949e);
}

.mc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* ── Shared Rating Site Icons ────────────────────────────────────────────────── */
.rating-site-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
