/**
 * Legendspeak ile birebir: profil kartı modali (oyun sitesi webx)
 * Tema değişkenleri sayfa :root'tan (--card, --text, --muted, --border, --orange) gelir.
 */

#profile-card-modal {
  --bg-card: var(--card);
  --bg-secondary: #121216;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --text-primary: var(--text);
  --text-secondary: var(--muted);
  --accent: var(--orange);
  --accent-hover: #e69700;
  --border: var(--border);
  --radius: 8px;
  --radius-lg: 12px;
}

#profile-card-modal.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  /* main içindeyken main(z-index:1) < header(100) altında kalıyordu; body çocuğu + üst katman */
  z-index: 10050;
  isolation: isolate;
}

#profile-card-modal.modal.hidden {
  display: none !important;
}

#profile-card-modal .modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 400px;
}

#profile-card-modal .profile-card-modal-content {
  max-width: 520px;
  width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 0;
}

#profile-card-modal .profile-card-modal-content .pm-close {
  top: 12px;
  right: 12px;
}

#profile-card-modal .profile-card-hidden {
  display: none !important;
}

#profile-card-modal .pm-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  z-index: 1;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}

#profile-card-modal .pm-close:hover {
  color: var(--text-primary);
}

/* Butonlar (Legendspeak .btn ile uyumlu, sadece modal içinde) */
#profile-card-modal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}

#profile-card-modal .btn:active {
  transform: scale(0.97);
}

#profile-card-modal .btn-primary {
  background: var(--accent);
  color: #fff;
}

#profile-card-modal .btn-primary:hover {
  background: var(--accent-hover);
}

#profile-card-modal .btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

#profile-card-modal .btn-outline:hover {
  background: var(--bg-hover);
}

#profile-card-modal .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#profile-card-modal .profile-card-in-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#profile-card-modal .profile-card-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

#profile-card-modal .profile-card-header h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px 0;
  color: var(--accent);
}

#profile-card-modal .profile-card-header p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 14px;
}

#profile-card-modal .profile-card-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

#profile-card-modal .profile-card-avatar-container {
  position: relative;
  display: inline-block;
}

#profile-card-modal .profile-card-avatar-container img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

#profile-card-modal .profile-card-online-status-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#profile-card-modal .profile-card-online-status-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#profile-card-modal .profile-card-online-status-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  min-width: 120px;
}

#profile-card-modal .profile-card-online-status-select:focus {
  outline: none;
  border-color: var(--accent);
}

#profile-card-modal .profile-card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

#profile-card-modal .profile-card-status-dot.online {
  background: #22c55e;
}
#profile-card-modal .profile-card-status-dot.offline {
  background: var(--text-secondary);
}
#profile-card-modal .profile-card-status-dot.away {
  background: #f59e0b;
}
#profile-card-modal .profile-card-status-dot.busy {
  background: #ef4444;
}

#profile-card-modal .profile-card-username {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

#profile-card-modal .profile-card-avatar-upload {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}

#profile-card-modal .profile-card-upload-btn {
  width: 100%;
}

#profile-card-modal .profile-card-avatar-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
  text-align: center;
}

#profile-card-modal .profile-card-form-section {
  display: grid;
  gap: 18px;
}

#profile-card-modal .profile-card-form-group {
  display: grid;
  gap: 6px;
}

#profile-card-modal .profile-card-form-group label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#profile-card-modal .profile-card-form-group input,
#profile-card-modal .profile-card-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}

#profile-card-modal .profile-card-form-group input:focus,
#profile-card-modal .profile-card-form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

#profile-card-modal .profile-card-form-group textarea {
  min-height: 80px;
  resize: vertical;
}

#profile-card-modal .profile-card-activity-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

#profile-card-modal .profile-card-activity-section h3 {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#profile-card-modal .profile-card-activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
}

#profile-card-modal .profile-card-activity-label {
  color: var(--text-secondary);
}
#profile-card-modal .profile-card-activity-value {
  color: var(--text-primary);
  font-weight: 500;
}

#profile-card-modal .profile-card-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

#profile-card-modal .profile-card-actions .btn {
  min-width: 120px;
}

/* Header’daki çevrimiçi rozeti: Meşgul */
.user-status.busy {
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.35);
}

.user-status.busy::before {
  background: #f97316;
}
