/* ============================================================
   team-signup.css — avânt · Pas 2.2
   Popup creare cont Multi / Pro (solo sau echipă) pe site.
   Același stil ca popup-ul existent de creare cont (#auth-popup-overlay).
   ============================================================ */

#team-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: none; justify-content: center; align-items: flex-start;
  z-index: 10000; backdrop-filter: blur(4px);
  padding: 32px 20px; overflow-y: auto;
  animation: apFadeIn 0.25s ease;
}
#team-popup-overlay.open { display: flex; }

#team-popup-overlay .tp-form {
  background: var(--surface, #fff); padding: 32px; border-radius: var(--radius, 12px);
  display: flex; flex-direction: column; gap: 14px;
  width: 100%; max-width: 460px; margin: auto 0;
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.12)); border: 1px solid #E9ECEF;
  position: relative; font-family: 'DM Sans', sans-serif;
  animation: apSlideIn 0.25s ease;
}
#team-popup-overlay h2 {
  text-align: center; color: var(--primary, #2C3E50);
  font-weight: 600; font-size: 22px; font-family: 'DM Sans', sans-serif;
}
#team-popup-overlay .tp-sub {
  font-size: 13px; color: var(--text-secondary, #6C757D);
  text-align: center; margin-top: -6px; line-height: 1.5;
}
#team-popup-overlay .tp-close {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; padding: 0;
  background: transparent; border: none; cursor: pointer;
  color: var(--text-secondary, #6C757D); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
#team-popup-overlay .tp-close:hover { background: #E9ECEF; color: var(--primary, #2C3E50); }

/* Comutator Solo / Echipă (doar Pro) */
#team-popup-overlay .tp-seg {
  display: flex; gap: 3px; padding: 3px;
  background: var(--background, #F8F9FA); border: 1px solid #E9ECEF; border-radius: 8px;
}
#team-popup-overlay .tp-seg button {
  flex: 1; border: none; background: transparent; cursor: pointer;
  padding: 7px 6px; border-radius: 6px; line-height: 1.25;
  font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text-secondary, #6C757D);
  transition: all 0.15s ease;
}
#team-popup-overlay .tp-seg button small { display: block; font-size: 11px; font-weight: 400; }
#team-popup-overlay .tp-seg button.active {
  background: #fff; color: var(--primary, #2C3E50); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#team-popup-overlay .tp-badge {
  text-align: center; font-size: 12px; color: var(--accent, #5BC0BE);
  font-weight: 500; padding: 6px 12px; background: rgba(91,192,190,0.1);
  border-radius: 4px; letter-spacing: 0.3px;
}
#team-popup-overlay .tp-label {
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-secondary, #6C757D); margin-top: 4px;
}
#team-popup-overlay input {
  padding: 13px 14px; font-size: 15px; border: 1px solid #E9ECEF;
  border-radius: var(--radius-sm, 8px); background: var(--background, #F8F9FA);
  width: 100%; font-family: 'DM Sans', sans-serif; color: var(--primary, #2C3E50);
  transition: all 0.2s ease;
}
#team-popup-overlay input:focus {
  outline: none; border-color: var(--accent, #5BC0BE);
  box-shadow: 0 0 0 3px rgba(91,192,190,0.1);
}
#team-popup-overlay input.tp-invalid { border-color: #DC3545; }
#team-popup-overlay .tp-row2 { display: flex; gap: 8px; }

/* Rânduri membri */
#team-popup-overlay .tp-members { display: flex; flex-direction: column; gap: 8px; }
#team-popup-overlay .tp-member {
  display: grid; grid-template-columns: 1fr 1fr 1.5fr 28px; gap: 6px; align-items: center;
}
#team-popup-overlay .tp-member input { padding: 10px; font-size: 14px; }
#team-popup-overlay .tp-remove {
  width: 28px; height: 28px; border: none; background: none; cursor: pointer;
  color: #9AA3AB; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
#team-popup-overlay .tp-remove:hover { background: #E9ECEF; color: var(--primary, #2C3E50); }
#team-popup-overlay .tp-remove[hidden] { visibility: hidden; display: flex; }
#team-popup-overlay .tp-add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: none; border: 1px dashed #CFD6DC; border-radius: 8px; padding: 10px;
  color: var(--primary, #2C3E50); font-size: 14px; font-weight: 500; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: border-color 0.2s;
}
#team-popup-overlay .tp-add:hover { border-color: var(--primary, #2C3E50); }

/* Total */
#team-popup-overlay .tp-total {
  background: var(--background, #F8F9FA); border: 1px solid #E9ECEF;
  border-radius: 8px; padding: 12px 14px; font-size: 14px;
}
#team-popup-overlay .tp-total .tp-line {
  display: flex; justify-content: space-between; padding: 2px 0;
  color: var(--text-secondary, #6C757D);
}
#team-popup-overlay .tp-total .tp-sum {
  display: flex; justify-content: space-between; font-weight: 600; font-size: 16px;
  color: var(--primary, #2C3E50);
  border-top: 1px solid #E9ECEF; margin-top: 6px; padding-top: 8px;
}
#team-popup-overlay .tp-total.tp-solo .tp-sum { border-top: none; margin-top: 0; padding-top: 0; }

#team-popup-overlay .tp-btn {
  width: 100%; padding: 16px; font-size: 16px; border: none;
  border-radius: var(--radius-sm, 8px); cursor: pointer;
  background: var(--primary, #2C3E50); color: #fff; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.2s ease; font-family: 'DM Sans', sans-serif;
}
#team-popup-overlay .tp-btn:hover { background: var(--primary-light, #3A506B); }
#team-popup-overlay .tp-btn:disabled { opacity: 0.6; cursor: not-allowed; }
#team-popup-overlay .tp-btn.tp-secondary {
  background: #fff; color: var(--primary, #2C3E50); border: 1px solid #E9ECEF;
}
#team-popup-overlay .tp-note {
  font-size: 12px; color: var(--text-secondary, #6C757D); text-align: center; line-height: 1.5;
}
#team-popup-overlay .tp-error {
  color: #DC3545; background: rgba(220,53,69,0.05);
  border: 1px solid rgba(220,53,69,0.2); padding: 12px 16px;
  border-radius: var(--radius-sm, 8px); font-size: 14px; text-align: center;
}
#team-popup-overlay .tp-error:empty { display: none; }

/* Ecran confirmare */
#team-popup-overlay .tp-ok-icon {
  width: 48px; height: 48px; border-radius: 50%; border: 1.8px solid var(--primary, #2C3E50);
  color: var(--primary, #2C3E50);
  display: flex; align-items: center; justify-content: center; margin: 4px auto 0;
}
#team-popup-overlay .tp-status-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 14px; padding: 9px 0; border-bottom: 1px solid #E9ECEF;
  color: var(--primary, #2C3E50);
}
#team-popup-overlay .tp-status-row span:last-child { color: #9AA3AB; white-space: nowrap; }

[hidden].tp-hide { display: none !important; }

@media (max-width: 520px) {
  #team-popup-overlay { padding: 16px 12px; }
  #team-popup-overlay .tp-form { padding: 24px 18px; }
  #team-popup-overlay h2 { font-size: 19px; }
  #team-popup-overlay .tp-member { grid-template-columns: 1fr 1fr 28px; }
  #team-popup-overlay .tp-member input[data-f="email"] { grid-column: 1 / 3; grid-row: 2; }
  #team-popup-overlay .tp-member { padding-bottom: 6px; border-bottom: 1px solid #F1F3F5; }
}
