/* Player profile (/user/gt-<gamertag>/) and Connections (/account/connections/) */

/* ---- Profile: one panel, the avatar on the left ---- */
.glowed .player-page {
  padding: 48px 40px;
  display: flex; justify-content: center;
}
.glowed .player-card {
  width: 100%; max-width: 640px;
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 28px; align-items: center;
  padding: 28px;
  border: 1px solid rgba(143, 234, 255, 0.2);
  border-radius: 18px;
  background: rgba(143, 234, 255, 0.04);
}
.glowed .player-icon { width: 128px; height: 128px; }
.glowed .player-card.missing .player-icon { opacity: 0.45; }
.glowed .player-meta {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.glowed .player-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(216, 240, 255, 0.5);
}
.glowed .player-card .player-handle {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 2rem; line-height: 1.1;
  letter-spacing: 0;
  color: #fff;
  text-shadow: 0 0 12px rgba(143, 234, 255, 0.3);
  word-break: break-word;
  margin: 0;
}
.glowed .player-actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.glowed .player-note {
  font-size: 0.875rem;
  color: rgba(216, 240, 255, 0.6);
}

/* ---- Avatars (Site::user_icon's .uicon) ---- */
.glowed .player-icon .uicon,
.glowed .conn-icon .uicon { width: 100%; height: 100%; }
.glowed .player-icon .uicon img,
.glowed .conn-icon .uicon img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  border-radius: 50%;
  border: 2px solid rgba(143, 234, 255, 0.4);
  box-shadow: 0 0 18px rgba(143, 234, 255, 0.3);
  background: rgba(143, 234, 255, 0.08);
}
.glowed .conn-icon .uicon img {
  border-width: 1px;
  box-shadow: 0 0 10px rgba(143, 234, 255, 0.25);
}

/* ---- A state where a button would be: Request Sent, Connected, Waiting ---- */
.glowed .conn-status {
  padding: 14px 22px;
  border: 1px dashed rgba(216, 240, 255, 0.25);
  border-radius: 999px;
  color: rgba(216, 240, 255, 0.6);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem; letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
}
.glowed .conn-status.on {
  border-style: solid;
  border-color: rgba(180, 220, 140, 0.45);
  color: #b4dc8c;
}
.glowed .btn-primary:disabled,
.glowed .btn-secondary:disabled { opacity: 0.5; cursor: default; }

/* ---- Connections: a panel each for requests, connections, sent ---- */
.glowed .conn-panel {
  padding: 20px 24px;
  border: 1px solid rgba(143, 234, 255, 0.2);
  border-radius: 18px;
  background: rgba(143, 234, 255, 0.03);
}
.glowed #conn_incoming { border-color: rgba(143, 234, 255, 0.4); }
.glowed .conn-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.glowed .conn-head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 1.125rem;
  color: #fff;
}
.glowed .conn-count {
  padding: 2px 8px;
  background: rgba(143, 234, 255, 0.15);
  border-radius: 999px;
  color: #8feaff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem;
}
.glowed .conn-list { display: flex; flex-direction: column; }
.glowed .conn-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(143, 234, 255, 0.1);
}
.glowed .conn-row:last-child { border-bottom: none; padding-bottom: 0; }
.glowed .conn-icon { width: 44px; height: 44px; }
.glowed .conn-info { min-width: 0; }
.glowed .conn-handle {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 1rem;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.glowed .conn-when {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(216, 240, 255, 0.5);
  margin-top: 2px;
}
.glowed .conn-actions {
  display: flex; align-items: center; gap: 8px;
}
.glowed .conn-actions .btn-primary,
.glowed .conn-actions .btn-secondary,
.glowed .conn-actions .conn-status {
  padding: 10px 16px;
  font-size: 0.625rem;
}
.glowed .conn-panel .notes-empty { margin-top: 8px; }

/* Find a Player: matches drop down as you type, each a link to the profile */
.glowed .conn-search { position: relative; margin-top: 4px; }
.glowed .conn-search > i {
  position: absolute; left: 15px; top: 50%;
  transform: translateY(-50%);
  color: rgba(143, 234, 255, 0.6);
  pointer-events: none;
}
.glowed .conn-search input {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(5, 8, 16, 0.5);
  border: 1px solid rgba(143, 234, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}
.glowed .conn-search input::placeholder { color: rgba(216, 240, 255, 0.35); }
.glowed .conn-search input::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px;
  cursor: pointer;
  background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3e%3cpath d='M1 1l10 10M11 1L1 11' stroke='%238feaff' stroke-width='1.5' stroke-linecap='round'/%3e%3c/svg%3e") center / contain no-repeat;
}
.glowed .conn-search input:focus {
  outline: none;
  border-color: rgba(143, 234, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(143, 234, 255, 0.15);
}
.glowed .conn-results {
  position: absolute; top: 100%; left: 0; right: 0;
  margin-top: 6px;
  padding: 4px;
  background: rgba(5, 12, 24, 0.96);
  border: 1px solid rgba(143, 234, 255, 0.3);
  border-radius: 12px;
  z-index: 10;
  max-height: 336px; overflow-y: auto;
  backdrop-filter: blur(20px);
}
.glowed .conn-results[hidden] { display: none; }
/* main and the footer are sibling layers (.glowed > *), so open matches lift main over the footer */
.glowed > main:has(.conn-results:not([hidden])) { z-index: 2; }
.glowed a.conn-result {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  color: rgba(216, 240, 255, 0.9);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
}
.glowed a.conn-result.active,
.glowed a.conn-result:hover { background: rgba(143, 234, 255, 0.12); color: #fff; }
.glowed .conn-result .conn-icon { width: 32px; height: 32px; flex: none; }
.glowed .conn-result-tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glowed .conn-noresult {
  padding: 10px 12px;
  font-size: 0.875rem;
  color: rgba(216, 240, 255, 0.5);
}

/* The star: outlined when off, gold when on */
.glowed .conn-star {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(143, 234, 255, 0.2);
  background: transparent;
  color: rgba(216, 240, 255, 0.45);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.glowed .conn-star:hover {
  border-color: rgba(255, 200, 100, 0.5);
  color: #ffc864;
}
.glowed .conn-star.on {
  border-color: rgba(255, 200, 100, 0.45);
  background: rgba(255, 200, 100, 0.08);
  color: #ffc864;
  filter: drop-shadow(0 0 6px rgba(255, 200, 100, 0.4));
}
.glowed .conn-star:focus-visible {
  outline: 2px solid #8feaff; outline-offset: 2px;
}

@media (max-width: 720px) {
  .glowed .player-page { padding: 24px 16px 32px; }
  .glowed .player-card {
    grid-template-columns: 88px 1fr;
    gap: 18px; padding: 18px;
  }
  .glowed .player-icon { width: 88px; height: 88px; }
  .glowed .player-card .player-handle { font-size: 1.5rem; }
  .glowed .conn-panel { padding: 16px; }
}
@media (max-width: 480px) {
  .glowed .player-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .glowed .player-actions { justify-content: center; }
  .glowed .conn-row { grid-template-columns: 40px 1fr auto; }
  .glowed .conn-icon { width: 40px; height: 40px; }
  /* buttons go under the name; the star stays beside it */
  .glowed #conn_incoming .conn-row,
  .glowed #conn_sent .conn-row { grid-template-columns: 40px 1fr; }
  .glowed #conn_incoming .conn-actions,
  .glowed #conn_sent .conn-actions { grid-column: 2; }
}
