/* Whois modal */
.whois-modal {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.whois-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 16px;
  border-radius: var(--chat-modal-card-radius, 12px);
  background: var(--bg-light);
  border: 1px solid var(--border);
}

.whois-hero-avatar-col {
  display: flex;
  justify-content: center;
  min-height: 88px;
}

.whois-hero-avatar-col .avatar-frame-slot {
  --frame-size: 88px;
  width: var(--frame-size);
  height: var(--frame-size);
}

.whois-hero-avatar-col .profile-view-avatar-wrap,
.whois-hero-avatar-col .profile-view-avatar {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.whois-hero-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.whois-hero-identity .user-name-meta-block {
  align-items: center;
}

.whois-hero-identity .profile-view-name,
.whois-hero-identity .member-name {
  font-size: 17px;
  font-weight: 700;
}

.whois-hero-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-light, rgba(41, 121, 255, 0.12));
  color: var(--accent, #2979ff);
}

.whois-card {
  border-radius: var(--chat-modal-card-radius, 12px);
  border: 1px solid var(--border);
  background: var(--bg-light);
  overflow: hidden;
}

.whois-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.whois-card-head .icon {
  opacity: 0.75;
}

.whois-card-body {
  padding: 4px 14px 10px;
}

.whois-section {
  margin-bottom: 0;
}

.whois-section + .whois-section,
.whois-card + .whois-card,
.whois-hero + .whois-card {
  margin-top: 0;
}

.whois-row {
  display: grid;
  grid-template-columns: minmax(88px, 34%) 1fr;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light, var(--border));
  align-items: start;
}

.whois-row:last-child {
  border-bottom: none;
}

.whois-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--light, var(--text-muted));
  min-width: 0;
}

.whois-value {
  font-size: 13px;
  color: var(--dark, var(--text));
  word-break: break-word;
  font-family: inherit;
}

.whois-value--mono {
  font-family: ui-monospace, Consolas, 'Courier New', monospace;
  font-size: 12px;
}

.whois-empty {
  font-size: 13px;
  color: var(--text-mid);
  margin: 0;
  padding: 12px 14px;
  text-align: center;
  border-radius: var(--chat-modal-card-radius, 12px);
  background: var(--bg-light);
  border: 1px dashed var(--border);
}

.whois-loading {
  padding: 24px 12px;
  text-align: center;
  color: var(--mid, var(--text-muted));
}

.whois-log-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -2px;
}

.whois-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.whois-log-table th,
.whois-log-table td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-light, var(--border));
}

.whois-log-table th {
  color: var(--light, var(--text-muted));
  font-weight: 600;
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.whois-log-table tbody tr:last-child td {
  border-bottom: none;
}

.whois-log-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

body.theme-dark .whois-hero {
  background: var(--bg-light);
  border-color: var(--border);
}

body.theme-dark .whois-card,
body.theme-dark .whois-empty {
  background: var(--bg-light);
  border-color: var(--border);
}

body.theme-dark .whois-card-head {
  background: transparent;
}

body.theme-dark .whois-log-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 520px) {
  .whois-row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px 0;
  }

  .whois-log-table {
    font-size: 11px;
  }

  .whois-log-table th,
  .whois-log-table td {
    padding: 7px 8px;
  }
}

.system-message-sub.system-join-ip {
  font-size: 11px;
  color: var(--light);
  margin-top: 2px;
  padding-left: 2px;
  font-family: ui-monospace, Consolas, monospace;
}

.chat-live-shell.has-live-voice .system-message-sub.system-join-ip {
  color: rgba(255, 255, 255, 0.75);
}
