/**
 * Phase A — UI Squadra compatta (gestiscisquadra.html)
 * Estratto da mockup-gestisci-ui-v2-temp.html tab Squadra
 */

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  flex-shrink: 0;
}

.role-pill.captain {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
}

.role-pill.vice {
  border-color: rgba(96, 165, 250, 0.45);
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.1);
}

.role-pill.member {
  color: #94a3b8;
}

.team-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.team-strip strong {
  color: #e2e8f0;
  font-weight: 700;
}

.squadra-panel {
  padding: 0;
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.squadra-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.squadra-panel-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #e2e8f0;
}

.btn-add-inline {
  border: none;
  background: transparent;
  color: #67e8f9;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  border-radius: 0.45rem;
  touch-action: manipulation;
}

.btn-add-inline.hidden {
  display: none;
}

.btn-add-inline:active {
  background: rgba(34, 211, 238, 0.12);
}

.requests-block,
.invites-block {
  padding: 0.55rem 0.85rem 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.requests-block {
  border-bottom-color: rgba(244, 114, 182, 0.2);
  background: rgba(244, 114, 182, 0.06);
}

.invites-block {
  border-bottom-color: rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.05);
}

.requests-block.hidden,
.invites-block.hidden {
  display: none;
}

.requests-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f9a8d4;
  margin-bottom: 0.35rem;
}

.invites-block .requests-label {
  color: #fde68a;
}

.request-row,
.invite-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.request-row:last-child,
.invite-row:last-child {
  border-bottom: none;
}

.request-name {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 0;
  color: #e2e8f0;
}

.request-sub {
  font-size: 0.62rem;
  color: #64748b;
  margin-top: 0.05rem;
}

.btn-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  border: none;
  font-size: 0.72rem;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.btn-icon.accept {
  background: #22d3ee;
  color: #0f172a;
}

.btn-icon.reject {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-icon.cancel {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.member-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.62rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.member-row:last-child {
  border-bottom: none;
}

.member-row.is-me {
  background: rgba(251, 191, 36, 0.05);
}

.member-row--clickable {
  cursor: pointer;
  touch-action: manipulation;
}

.member-row--clickable:active {
  background: rgba(255, 255, 255, 0.04);
}

.avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #cbd5e1;
  flex-shrink: 0;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
}

.member-you {
  margin-left: 0.35rem;
  font-size: 0.58rem;
  font-weight: 800;
  color: #fde68a;
  text-transform: uppercase;
}

.member-empty {
  text-align: center;
  color: #64748b;
  font-size: 0.78rem;
  padding: 1rem 0.85rem;
}

.squadra-settings {
  margin-bottom: 0.5rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
  overflow: hidden;
}

.squadra-settings.hidden {
  display: none;
}

.squadra-settings summary {
  padding: 0.72rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  color: #cbd5e1;
}

.squadra-settings summary::-webkit-details-marker {
  display: none;
}

.squadra-settings summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  float: right;
  font-size: 0.65rem;
  color: #64748b;
}

.squadra-settings[open] summary::after {
  content: '\f077';
}

.settings-list {
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row i {
  width: 1.25rem;
  color: #64748b;
}

.settings-row .badge {
  margin-left: auto;
  color: #67e8f9;
  font-size: 0.68rem;
  font-weight: 800;
}

.settings-row.danger {
  color: #fca5a5;
}

.settings-row.danger i {
  color: #ef4444;
}

.settings-row.hidden {
  display: none;
}

.settings-row:active {
  background: rgba(255, 255, 255, 0.04);
}

#team-page-title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
  text-align: center;
  line-height: 1.2;
}

.squadra-panel-foot {
  margin-bottom: 5.5rem;
}

/* Phase A.2 — wizard Aggiungi compagno */
.add-companion-wizard {
  text-align: left;
}

.add-wizard-title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  text-align: center;
}

.add-wizard-sub {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  line-height: 1.45;
}

.add-wizard-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  background: transparent;
  color: #67e8f9;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.15rem 0;
  margin-bottom: 0.65rem;
  touch-action: manipulation;
}

.add-wizard-back:active {
  opacity: 0.75;
}

.choice-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  touch-action: manipulation;
}

.choice-card:active {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.06);
}

.choice-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.choice-card.invite .choice-icon {
  background: rgba(34, 211, 238, 0.15);
  color: #67e8f9;
}

.choice-card.manual .choice-icon {
  background: rgba(251, 191, 36, 0.15);
  color: #fde68a;
}

.choice-card h4 {
  margin: 0 0 0.15rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #f1f5f9;
}

.choice-card p {
  margin: 0;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
}

.add-wizard-close {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.7rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.add-wizard-form-block {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
}

.add-wizard-form-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.45rem;
}

.add-wizard-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.add-wizard-actions .btn-modern {
  flex: 1;
}

.add-wizard-search-results {
  margin-top: 0.5rem;
  max-height: 10rem;
  overflow-y: auto;
}

.add-wizard-search-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 0.65rem;
  cursor: pointer;
  touch-action: manipulation;
}

.add-wizard-search-row:active {
  background: rgba(255, 255, 255, 0.06);
}

.add-wizard-divider {
  text-align: center;
  font-size: 0.68rem;
  color: #64748b;
  margin: 0.75rem 0;
}

.add-wizard-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (max-width: 420px) {
  .add-wizard-grid-2 {
    grid-template-columns: 1fr;
  }
}
