/* Meet the team: clickable cards and the details panel. */

.team-card.is-clickable { cursor: pointer; position: relative; }
.team-card.is-clickable:focus-visible { outline: 2px solid var(--role-color, var(--accent, #f26173)); outline-offset: 2px; }

.team-role.has-icon::before { display: none; }
.team-role img { width: 14px; height: 14px; border-radius: 3px; object-fit: contain; flex: none; }

.team-more {
  margin-top: auto;
  font-size: 0.76rem;
  color: var(--faint, #6a6a73);
  transition: color 0.18s ease;
}
.team-more span { display: inline-block; transition: transform 0.18s ease; }
.team-card.is-clickable:hover .team-more,
.team-card.is-clickable:focus-visible .team-more { color: var(--role-color, var(--ink, #f7f7f9)); }
.team-card.is-clickable:hover .team-more span { transform: translateX(3px); }

/* details panel */
html.team-modal-open { overflow: hidden; }

.team-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  width: min(30rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--role-color, #888) 40%, var(--line-2, rgba(255, 255, 255, 0.13)));
  border-radius: 16px;
  background: var(--panel, #0b0b0e);
  color: var(--ink, #f7f7f9);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: auto;
}
.team-modal::backdrop { background: rgba(3, 3, 6, 0.72); backdrop-filter: blur(4px); }
.team-modal[open] { animation: tm-in 0.2s ease-out; }
@keyframes tm-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

.tm-inner { position: relative; padding: 0 1.4rem 1.3rem; }
.tm-band {
  height: 74px;
  margin: 0 -1.4rem;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--role-color, #888) 55%, transparent), transparent 70%),
    color-mix(in srgb, var(--role-color, #888) 14%, var(--panel-2, #101014));
}
.tm-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink, #f7f7f9);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.tm-close:hover { background: rgba(0, 0, 0, 0.55); }

.tm-head { display: flex; align-items: flex-end; gap: 1rem; margin-top: -40px; }
.tm-avatar { flex: 0 0 88px; width: 88px; height: 88px; }
.tm-avatar .team-avatar {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  border: 3px solid var(--panel, #0b0b0e);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--role-color, #888) 55%, transparent);
}
.tm-avatar .team-dot { width: 20px; height: 20px; border-color: var(--panel, #0b0b0e); }
.tm-id { min-width: 0; padding-bottom: 0.15rem; }
.tm-id h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.tm-handle { margin: 0.1rem 0 0; color: var(--mute, #9b9ba4); font-size: 0.86rem; }
.tm-status { display: flex; align-items: center; gap: 0.4rem; margin: 0.35rem 0 0; color: var(--mute, #9b9ba4); font-size: 0.82rem; overflow-wrap: anywhere; }
.tm-status-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #80848e; }
.tm-status-dot[data-status="online"] { background: #23a559; }
.tm-status-dot[data-status="idle"] { background: #f0b232; }
.tm-status-dot[data-status="dnd"] { background: #f23f43; }
.tm-status-dot[data-status="streaming"] { background: #593695; }

.tm-section { margin-top: 1.15rem; }
.tm-section h3 {
  margin: 0 0 0.5rem;
  font-family: var(--mono, ui-monospace, Consolas, monospace);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint, #6a6a73);
}
.tm-roles { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tm-roles .team-role { font-size: 0.76rem; }
.tm-summary { margin: 0; color: color-mix(in srgb, var(--ink, #f7f7f9) 88%, transparent); font-size: 0.95rem; line-height: 1.55; }
.tm-list { margin: 0.7rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; }
.tm-list li { position: relative; padding-left: 1rem; color: var(--mute, #9b9ba4); font-size: 0.88rem; }
.tm-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 2px; background: var(--role-color, #888); }

.tm-skills { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.tm-skills li { display: grid; grid-template-columns: minmax(0, 1fr) auto 5.6rem; align-items: center; gap: 0.75rem; font-size: 0.88rem; }
.tm-skill-name { color: var(--ink, #f7f7f9); }
.tm-skills.is-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tm-skills.is-tags li {
  display: inline-flex;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--role-color, #888) 40%, transparent);
  background: color-mix(in srgb, var(--role-color, #888) 10%, transparent);
  font-size: 0.82rem;
}
.tm-skills li.no-level { grid-template-columns: 1fr; }
.tm-skill-bars { display: inline-flex; gap: 3px; }
.tm-skill-bars i { width: 18px; height: 6px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); }
.tm-skill-bars i.on { background: var(--role-color, #888); }
.tm-skill-level { color: var(--mute, #9b9ba4); font-size: 0.78rem; text-align: right; }

.tm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.07));
}
.tm-since { color: var(--faint, #6a6a73); font-size: 0.78rem; }

@media (max-width: 480px) {
  .tm-inner { padding: 0 1rem 1.1rem; }
  .tm-band { margin: 0 -1rem; }
  .tm-head { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .tm-foot .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .team-modal[open] { animation: none; }
  .team-more span { transition: none; }
}
