/* ═══════════════════════════════════════════════════════════
   profile-modal.css
   BlueChipScout – Profil Modal (Drei-Karten-Layout)
   ═══════════════════════════════════════════════════════════ */

/* ── OVERLAY ── */
#pmOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#pmOverlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── CARD CONTAINER ── */
#pmContainer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-height: calc(100vh - 40px);
}

/* ── EINZELNE KARTE ── */
.pm-card {
  background: #141614;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  width: 360px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

/* Karte 2 + 3 – initial versteckt */
#pmCard2, #pmCard3 {
  opacity: 0;
  transform: translateX(16px) scale(0.98);
  pointer-events: none;
  width: 0;
  border: none;
  overflow: hidden;
  transition: opacity 0.28s ease, transform 0.28s ease, width 0.28s ease, border 0.1s ease 0.2s, padding 0.28s ease;
}
#pmCard2.open, #pmCard3.open {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: all !important;
  width: 360px;
  border: 1px solid rgba(255,255,255,0.1);
  margin-left: 12px;
}

/* ── KARTEN-INHALT ── */
.pm-card-inner {
  padding: 28px 24px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.pm-card-inner::-webkit-scrollbar { width: 4px; }
.pm-card-inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ── AKTIONEN (sticky footer in Karte 1) ── */
.pm-card-actions {
  padding: 12px 24px 20px;
  flex-shrink: 0;
}

/* ── HEADER ── */
.pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.pm-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #e8ede9;
}
.pm-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: none;
  border: 1px solid rgba(255,95,95,0.2);
  color: #ff5f5f;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.pm-close:hover { background: rgba(255,95,95,0.12); border-color: #ff5f5f; color: #ff5f5f; }

/* ── AVATAR ── */
.pm-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 20px;
}
.pm-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.12);
  background: #1a1d1b;
  margin-bottom: 10px;
}
.pm-avatar-name {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #e8ede9;
  margin-bottom: 6px;
}
.pm-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── BADGES ── */
.pm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  padding: 3px 9px;
  border-radius: 20px;
}
.pm-badge-free    { background: rgba(61,255,122,0.08); color: #3dff7a; border: 1px solid rgba(61,255,122,0.2); }
.pm-badge-premium { background: rgba(255,184,77,0.1);  color: #ffb84d; border: 1px solid rgba(255,184,77,0.2); }
.pm-badge-admin   { background: rgba(255,184,77,0.15); color: #ffb84d; border: 1px solid rgba(255,184,77,0.4); }
.pm-badge-test    { background: rgba(100,100,255,0.1); color: #8888ff; border: 1px solid rgba(100,100,255,0.3); }

/* ── INFO ROWS ── */
.pm-section {
  background: #1a1d1b;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 4px 12px;
  margin-bottom: 10px;
}
.pm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pm-row:last-child { border-bottom: none; }
.pm-label { font-size: 11px; font-family: 'DM Mono', monospace; color: #7a8f7c; }
.pm-value { font-size: 11px; font-family: 'DM Mono', monospace; color: #e8ede9; text-align: right; }

/* ── SECTION LABEL ── */
.pm-section-label {
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  color: #7a8f7c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 16px 0 8px;
}
.pm-section-label:first-child { margin-top: 0; }

/* ── BUTTONS ── */
.pm-btn {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-align: center;
  display: block;
  margin-bottom: 8px;
}
.pm-btn:last-child { margin-bottom: 0; }
.pm-btn-secondary { background: #1a1d1b; border: 1px solid rgba(255,255,255,0.07); color: #a8bfaa; }
.pm-btn-secondary:hover { border-color: rgba(255,255,255,0.15); color: #e8ede9; }
.pm-btn-accent { background: rgba(61,255,122,0.08); border: 1px solid rgba(61,255,122,0.25); color: #3dff7a; }
.pm-btn-accent:hover { background: #3dff7a; color: #0d0f0e; }
.pm-btn-amber { background: rgba(255,184,77,0.08); border: 1px solid rgba(255,184,77,0.25); color: #ffb84d; }
.pm-btn-amber:hover { background: rgba(255,184,77,0.18); }
.pm-btn-danger { background: rgba(255,95,95,0.06); border: 1px solid rgba(255,95,95,0.2); color: #ff5f5f; }
.pm-btn-danger:hover { background: rgba(255,95,95,0.14); border-color: #ff5f5f; }

/* ── USERNAME EDIT ── */
.pm-input {
  width: 100%;
  padding: 8px 12px;
  background: #1a1d1b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #e8ede9;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s;
}
.pm-input:focus { border-color: rgba(255,255,255,0.2); }

/* ── FEATURE LIST ── */
.pm-feature-list {
  font-size: 12px;
  color: #a8bfaa;
  font-family: 'DM Mono', monospace;
  line-height: 2.2;
  margin-bottom: 14px;
}

/* ── TIER SWITCHER ── */
.pm-tier-switcher {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.pm-tier-btn {
  flex: 1;
  padding: 7px;
  border-radius: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.07);
  background: #1a1d1b;
  color: #a8bfaa;
  transition: all 0.15s;
}
.pm-tier-btn.active { border-color: #3dff7a; color: #3dff7a; background: rgba(61,255,122,0.08); }

/* ── USER LIST ── */
.pm-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 11px;
  font-family: 'DM Mono', monospace;
}
.pm-user-row:last-child { border-bottom: none; }
.pm-user-email { flex: 1; color: #a8bfaa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-user-select {
  padding: 2px 4px;
  background: #1a1d1b;
  border: 1px solid rgba(255,255,255,0.07);
  color: #e8ede9;
  font-size: 10px;
  border-radius: 3px;
}

/* ── MSG ── */
.pm-msg {
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 8px;
  display: none;
}
.pm-msg.success { background: rgba(61,255,122,0.08); color: #3dff7a; border: 1px solid rgba(61,255,122,0.2); }
.pm-msg.error   { background: rgba(255,95,95,0.08);  color: #ff5f5f; border: 1px solid rgba(255,95,95,0.2); }

/* ── DIVIDER ── */
.pm-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 14px 0; }

/* ── SPINNER ── */
.pm-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #3dff7a;
  border-radius: 50%;
  animation: pm-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes pm-spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 820px) {
  #pmContainer {
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    max-height: calc(100vh - 40px);
  }
  .pm-card { width: 100%; max-width: 400px; max-height: none; }
  #pmCard2, #pmCard3 { width: 0; max-height: 0; }
  #pmCard2.open, #pmCard3.open { width: 100%; max-width: 400px; max-height: none; }
}
