/* ParticipantIcon - team icons from participants database */

.participant-icon {
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 2px;
}

/* Size presets */
.participant-icon--small {
  width: 16px;
  height: 16px;
}

.participant-icon--medium {
  width: 20px;
  height: 20px;
}

.participant-icon--large {
  width: 24px;
  height: 24px;
}

/* Prevent layout shift when icon fails to load */
.participant-icon:not([src]) {
  display: none;
}

/* Visible placeholder while loading or if icon unavailable */
.participant-icon-placeholder {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  flex-shrink: 0;
}

.participant-icon-placeholder.participant-icon--small {
  width: 16px;
  height: 16px;
}

.participant-icon-placeholder.participant-icon--medium {
  width: 20px;
  height: 20px;
}

.participant-icon-placeholder.participant-icon--large {
  width: 24px;
  height: 24px;
}

/* Doubles - two icons side by side */
.participant-icon-doubles {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.participant-icon-doubles--small {
  gap: 1px;
}

.participant-icon-doubles--medium {
  gap: 2px;
}

.participant-icon-doubles--large {
  gap: 2px;
}

.participant-icon-doubles .participant-icon--second {
  margin-left: -6px;
}

.participant-icon-doubles .participant-icon-placeholder.participant-icon--second {
  margin-left: -6px;
}

/* ParticipantInfo - displays extended info for Tennis/MMA participants */

.participant-info {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 10px;
  color: #8b9199;
  color: var(--text-secondary, #8b9199);
  margin-top: 1px;
  flex-wrap: nowrap;
  line-height: 1.2;
}

/* Country flag */
.participant-info-flag {
  width: 14px;
  height: 10px;
  object-fit: cover;
  border-radius: 1px;
  flex-shrink: 0;
}

/* Rank text (WTA: 59, ATP: 105) */
.participant-info-rank {
  font-weight: 500;
  color: #f5a623;
  color: var(--accent-color, #f5a623);
  white-space: nowrap;
}

/* Separator bullet */
.participant-info-sep {
  color: #6c757d;
  color: var(--text-muted, #6c757d);
  font-size: 8px;
}

/* Birthday and age */
.participant-info-age {
  white-space: nowrap;
  color: #6c757d;
  color: var(--text-tertiary, #6c757d);
}

/* Compact mode for tight spaces */
.participant-info.compact {
  font-size: 9px;
  gap: 3px;
}

.participant-info.compact .participant-info-flag {
  width: 12px;
  height: 8px;
}

/* Light theme adjustments */
[data-theme="light"] .participant-info {
  color: #666;
}

[data-theme="light"] .participant-info-rank {
  color: #b88a00;
}

[data-theme="light"] .participant-info-age {
  color: #888;
}

/* Doubles layout - two players side by side */
.participant-info-doubles {
  flex-wrap: wrap;
}

.participant-info-player {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.participant-info-doubles-sep {
  color: #6c757d;
  color: var(--text-muted, #6c757d);
  margin: 0 2px;
}

/* Compact doubles */
.participant-info-doubles.compact .participant-info-player {
  gap: 2px;
}

/* PasswordSecurityPage.css */
.security-page {
  background: var(--bg-primary);
  padding-bottom: 80px;
}

.security-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.security-back {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.security-back svg {
  width: 24px;
  height: 24px;
}

.security-header h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.security-content {
  padding: 20px;
  margin: 0 auto;
}

.security-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.security-card-header {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.security-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.security-card-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.security-card-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.security-card-header p {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
}

.security-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 10px;
  margin-bottom: 20px;
  color: #22c55e;
  font-size: 14px;
}

.security-success svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.security-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  margin-bottom: 20px;
  color: #ef4444;
  font-size: 14px;
}

.security-error svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.security-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.security-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.security-input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.security-input-group input {
  background: #0d0d0e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.security-input-group input:focus {
  border-color: var(--accent-green);
}

.security-input-group input::placeholder {
  color: var(--text-quaternary);
}

.security-hint {
  font-size: 12px;
  color: var(--text-quaternary);
}

.security-submit {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  margin-top: 10px;
}

.security-submit:hover:not(:disabled) {
  opacity: 0.9;
}

.security-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.security-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.security-info {
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.1);
  border-radius: 12px;
  padding: 20px;
}

.security-info h3 {
  font-size: 14px;
  font-weight: 600;
  color: #22c55e;
  margin: 0 0 12px;
}

.security-info ul {
  margin: 0;
  padding-left: 20px;
}

.security-info li {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.security-info li:last-child {
  margin-bottom: 0;
}

/* ============ 2FA ============ */
.tfa-icon {
  background: linear-gradient(135deg, #0A84FF 0%, #0066CC 100%) !important;
}

.tfa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Proxima Nova', sans-serif;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  border: none;
}

.tfa-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tfa-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.tfa-btn-primary {
  background: var(--accent-blue);
  color: #fff;
}

.tfa-btn-primary:hover:not(:disabled) {
  opacity: 0.9;
}

.tfa-btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--separator);
}

.tfa-btn-secondary:hover:not(:disabled) {
  background: var(--bg-tertiary);
}

.tfa-btn-danger {
  background: var(--accent-red);
  color: #fff;
}

.tfa-btn-danger:hover:not(:disabled) {
  opacity: 0.9;
}

.tfa-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 16px;
}

/* Setup top: QR + key stacked, left-aligned, capped to QR width */
.tfa-setup-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  max-width: 320px;
}

@media (max-width: 560px) {
  .tfa-setup-top {
    align-items: center;
    align-self: center;
    margin-left: auto;
    margin-right: auto;
  }
}

/* QR */
.tfa-qr-wrap {
  flex-shrink: 0;
}

.tfa-qr {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

/* Manual key */
.tfa-manual-key {
  flex: 1 1;
  min-width: 0;
}

.tfa-key-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.tfa-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--separator);
  border-radius: 8px;
  padding: 10px 14px;
}

.tfa-key-code {
  flex: 1 1;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.5;
}

.tfa-copy-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--accent-blue);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Proxima Nova', sans-serif;
  flex-shrink: 0;
  transition: background 0.15s;
}

.tfa-copy-btn:hover {
  background: var(--accent-blue-muted);
}

/* Code input */
.tfa-verify-section {
  border-top: 1px solid var(--separator-light);
  padding-top: 20px;
}

/* Backup codes */
.tfa-backup-warning {
  background: rgba(230, 126, 34, 0.08);
  border: 1px solid rgba(230, 126, 34, 0.2);
  border-radius: 10px;
  padding: 12px 16px;
  color: #e67e22;
  color: var(--accent-orange, #e67e22);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

.tfa-codes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px;
  gap: 8px;
  margin-bottom: 20px;
}

.tfa-backup-code {
  background: var(--bg-tertiary);
  border: 1px solid var(--separator);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.tfa-backup-actions {
  display: flex;
  gap: 10px;
}

.tfa-backup-actions .tfa-btn {
  flex: 1 1;
}

/* Email fallback */
.tfa-email-fallback {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.tfa-cant-access {
  font-size: 13px;
  color: var(--text-tertiary);
}

.tfa-email-btn {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Proxima Nova', sans-serif;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.tfa-email-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: none;
}

/* Mobile */
@media (max-width: 480px) {
  .security-content {
    padding: 16px;
  }

  .security-card {
    padding: 20px;
  }

  .security-card-header {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

