/* Help panel: a column on the right. When it is open, the page body gets the same width off its right edge. */
:root {
  --help-width: 380px;
}

/* Connector commands contain long opaque tokens. Keep them inside the card and leave room for copy. */
.command-block {
  position: relative;
  min-width: 0;
}

.command-pre {
  margin-bottom: 0;
  padding-right: 3.5rem !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.command-pre code {
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
}

.command-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.server-overview-hero {
  overflow: hidden;
  background: radial-gradient(circle at 85% 15%, rgba(32, 107, 196, 0.2), transparent 34%), var(--tblr-bg-surface);
}

.server-overview-icon {
  width: 4rem;
  height: 4rem;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  color: var(--tblr-primary);
  background: rgba(32, 107, 196, 0.14);
  font-size: 2rem;
}

.server-stat-icon {
  float: right;
  font-size: 1.7rem;
}

.server-stat strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.1rem;
}

.server-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.server-service-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  color: inherit;
  text-decoration: none;
}

.server-service-card:hover {
  border-color: var(--tblr-primary);
  color: inherit;
}

.server-service-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  color: var(--tblr-primary);
  background: rgba(32, 107, 196, 0.14);
  font-size: 1.25rem;
}

.server-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 7rem;
  padding: 1rem;
  border: 1px dashed var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
}

.server-empty > i { font-size: 2rem; color: var(--tblr-secondary); }
.server-empty > div { flex: 1 1 16rem; min-width: 0; }
.server-empty > .btn { flex: none; }
.server-empty p { margin: 0.2rem 0 0; color: var(--tblr-secondary); }
.server-details { margin: 0; }
.server-details dt { color: var(--tblr-secondary); font-weight: 400; }
.server-details dd { margin: 0.2rem 0 1rem; }
.server-details dd:last-child { margin-bottom: 0; }

@media (max-width: 767.98px) {
  .server-service-grid { grid-template-columns: minmax(0, 1fr); }
  .server-empty { align-items: flex-start; flex-wrap: wrap; }
}

.help-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  width: var(--help-width);
  max-width: 100vw;
  overflow-y: auto;
  background: var(--tblr-bg-surface, #1a1f24);
  border-left: 1px solid var(--tblr-border-color, #2b3137);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.help-fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1035;
}

.page-wrapper {
  transition: margin-right 0.25s ease;
}

/* Wide screens: the body narrows while the panel is open. Narrow screens: the panel covers the page instead. */
@media (min-width: 992px) {
  html.help-open .page-wrapper {
    margin-right: var(--help-width);
  }
}

html.help-open .help-panel {
  transform: none;
}

html.help-open .help-fab {
  display: none;
}
