/* R13.2.J — Team effort modal */

.team-modal { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; padding: 24px; }
.team-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.38); }
.team-modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: min(88dvh, 88vh);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.team-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 4px 18px;
}
.team-modal-title { margin: 0; font-size: 1.05rem; font-family: 'Space Grotesk', sans-serif; color: #111827; }
.team-modal-sub { margin: 0 18px 8px; font-size: 0.82rem; color: #6b7280; line-height: 1.4; }
.team-modal-close {
  background: transparent;
  border: 0;
  font-size: 1.3rem;
  color: #6b7280;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}
.team-modal-close:hover { background: rgba(0, 0, 0, 0.06); color: #111827; }
.team-modal-body {
  padding: 4px 18px 16px 18px;
  overflow-y: auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.team-quick { display: flex; gap: 6px; padding: 4px 0 10px; }
.team-quick-btn {
  flex: 1;
  padding: 8px;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: #374151;
}
.team-quick-btn:hover { background: #f3f4f6; }

.team-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #f3f4f6;
  background: #fafafa;
}
.team-row:hover { background: #f5f3ff; border-color: #e5e7eb; }
.team-icon { font-size: 1.4rem; line-height: 1; text-align: center; }
.team-info { min-width: 0; }
.team-name { font-weight: 600; font-size: 0.9rem; color: #111827; }
.team-desc {
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 2px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Toggle switch — mirrors members rail */
.team-toggle { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.team-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.team-toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 120ms ease;
}
.team-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 120ms ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.team-toggle input:checked + .team-toggle-slider { background: #c084fc; }
.team-toggle input:checked + .team-toggle-slider::before { transform: translateX(16px); }
.team-toggle input:focus-visible + .team-toggle-slider { outline: 2px solid #f97316; outline-offset: 2px; }

/* Count chip on the team button */
.team-btn-count {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #c084fc;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9999px;
  line-height: 1.3;
  min-width: 14px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
