@import url('https://fonts.googleapis.com/css2?family=Raleway&display=swap');

/* Overall page layout */

.server-page {
  max-width: 1100px;
  margin: 32px auto 60px auto;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: 'Raleway', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
}

/* Flash messages */

.flash-container {
  margin-bottom: 16px;
}

.flash {
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 14px;
}

/* basic category colours – adjust if you use others */
.flash-success {
  background: #e6f9ed;
  color: #1f7a3a;
}

.flash-error,
.flash-danger {
  background: #ffe6e6;
  color: #b91c1c;
}

.flash-info {
  background: #e5f3ff;
  color: #1d4ed8;
}

/* Hero section */

.server-hero {
  margin-bottom: 28px;
}

.server-hero-card {
  align-items: center;
}

/* Restrict logo dimensions so it doesn't push content */
.server-hero-card .server-logo-wrapper {
  max-width: 512px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.server-hero-card .server-logo {
  width: 100%;
  height: auto;
  max-width: 512px;
  border-radius: 16px;
  object-fit: contain;
}

/* reuse logo from servers.css, but allow larger if needed */
.server-name-large {
  font-size: 28px;
  margin-bottom: 4px;
}

/* Header line: name + edit button */

.server-header-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Edit button */

.server-edit-btn {
  display: inline-block;
  background: var(--dark-purple);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.server-edit-btn:hover {
  background: var(--light-purple);
}

/* IP chip next to name */

.server-ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f5f3ff;
  border-radius: 999px;
  padding: 3px 10px;
  margin-top: 4px;
}

.server-ip-chip .ip-label {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #555;
}

.server-ip-chip .ip-value {
  font-family: monospace;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 999px;
  background: white;
  color: #222;
}

/* Larger description formatting for hero */

.server-description-large {
  margin-top: 10px;
  margin-bottom: 18px;
  font-size: 15px;
}

/* Actions row in hero reuses .server-actions + .server-cta-card from servers.css */

/* Content grid below hero */

.server-content-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

/* generic section card */

.server-section-card {
  background: white;
  border-radius: 24px;
  padding: 18px 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
}

/* section header with optional votes summary */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.section-header h2 {
  margin: 0;
  font-size: 20px;
}

.section-body {
  font-size: 14px;
  color: #444;
  line-height: 1.6;
}

/* votes summary in "Recent votes" header */

.votes-summary {
  margin: 0;
  font-size: 13px;
  color: #7a7a8c;
  white-space: nowrap;
}

/* placeholder note block for future content */

.placeholder-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8f7ff;
  font-size: 13px;
  color: #555;
}

/* Recent votes list */

.votes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vote-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.vote-item:last-child {
  border-bottom: none;
}

.vote-player {
  font-weight: 600;
}

.vote-time {
  font-family: monospace;
  font-size: 12px;
  color: #666;
}

/* Votifier details */

.votifier-details {
  font-size: 14px;
}

.votifier-details summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 6px;
}

/* Vote button card colour */

.vote-card {
  background: var(--dark-purple);
  color: white;
}

/* Back link */

.server-back-link {
  margin-top: 24px;
  font-size: 14px;
}

.server-back-link a {
  color: var(--dark-purple);
  text-decoration: none;
}

.server-back-link a:hover {
  text-decoration: underline;
}

/* Responsive tweaks */

@media screen and (max-width: 900px) {
  .server-page {
    margin-top: 20px;
  }

  .server-hero-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .server-header-topline {
    flex-direction: column;
    align-items: center;
  }

  .server-edit-btn {
    width: auto;
  }

  .server-ip-chip {
    margin-left: 0;
    justify-content: center;
  }

  .server-content-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .votes-summary {
    white-space: normal;
  }

  .vote-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}
