/* Replayer embedded in SaaS app shell */

body.app-shell-layout[data-active-nav="replayer"] .app-layout {
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.app-shell-layout[data-active-nav="replayer"] .app-main {
  min-height: 0;
  overflow: hidden;
}

.shell-main--replayer {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.5rem 0.75rem 0.35rem;
  overflow: hidden;
}

.shell-main--replayer .replayer-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app-page-header .replayer-hand-id {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(32vw, 360px);
}

.app-page-header .replayer-hand-id.hand-id-red {
  color: #ff8888;
}

.app-page-header .replayer-hand-id.hand-id-green {
  color: #7ddc7d;
}

.app-page-header .replayer-hand-id.hand-id-blue {
  color: #7eb8ff;
}

.app-page-header .replayer-hand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.app-page-header .replayer-hand-mark-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.app-page-header .hand-color-dot-btn {
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--dot-color, #555);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.app-page-header .hand-color-dot-btn:hover {
  transform: scale(1.08);
}

.app-page-header .hand-color-dot-btn.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
  transform: scale(1.12);
}

.app-page-header .replayer-tool-btn {
  background: var(--surface-hover);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  transition: background var(--transition), border-color var(--transition);
}

.app-page-header .replayer-tool-btn:hover {
  background: var(--card);
  border-color: var(--link);
}

.app-page-header .replayer-tool-btn.active {
  border-color: var(--accent);
  box-shadow: var(--glow-ok);
}

@media (max-width: 900px) {
  .app-page-header .replayer-hand-mark-label {
    display: none;
  }
}

/* --- Share Hand Feature --- */

.share-hand-dialog {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  padding: 0;
  max-width: 400px;
  width: 95vw;
}

.share-hand-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.share-hand-dialog .dialog-form {
  padding: 1.25rem;
}

.share-hand-dialog h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.share-hand-desc {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.share-target-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.share-target-section-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.4rem 0.6rem 0.2rem;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}

.share-target-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background var(--transition);
}

.share-target-item:last-child {
  border-bottom: none;
}

.share-target-item:hover {
  background: var(--surface-hover);
}

.share-target-item.share-target-done {
  opacity: 0.5;
}

.share-target-avatar {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--surface-hover);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.share-target-group-icon {
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.share-target-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-target-loading {
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
