/**
 * API.DevWharf - Test Page Styles
 * Specific styles for the /test page
 */

/* ===============================
   PAGE HEADER - CENTERED
   =============================== */

.test-page .page-header {
  text-align: center;
  padding: 4rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.test-page .page-header .glitch-text {
  text-align: center;
}

.test-page .page-header .tagline {
  text-align: center;
  margin-top: 1rem;
}

/* ===============================
   TWO-COLUMN LAYOUT
   =============================== */

.test-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  align-items: start;
}

.endpoints-column,
.schema-column {
  display: flex;
  flex-direction: column;
}

.endpoints-column .section-title,
.schema-column .section-title {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

/* ===============================
   ENDPOINT CARDS - STACKED
   =============================== */

.endpoint-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.endpoint-stack .endpoint-card {
  margin: 0;
}

/* ===============================
   SCHEMA TABLE
   =============================== */

.schema-container {
  margin: 0;
}

.schema-table {
  background: var(--bg-card);
  border: 1px solid rgba(0, 255, 249, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

.schema-row {
  display: grid;
  grid-template-columns: 130px 130px 1fr;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.schema-row:last-child {
  border-bottom: none;
}

.schema-row.header {
  background: rgba(0, 255, 249, 0.1);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--accent-cyan);
}

.field-name {
  color: var(--accent-purple);
  font-weight: 500;
  font-size: 0.85rem;
}

.field-type {
  color: var(--accent-cyan);
  font-size: 0.8rem;
}

.field-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ===============================
   API STATS CARDS - HORIZONTAL
   =============================== */

.api-stats {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.api-stats .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid rgba(0, 255, 249, 0.2);
  border-radius: 8px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.api-stats .stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-shadow: var(--glow-cyan);
}

.api-stats .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ===============================
   LIVE TEST SECTION - UNDER SCHEMA
   =============================== */

.live-test-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(0, 255, 249, 0.2);
  border-radius: 12px;
  text-align: center;
}

.live-test-box .section-title {
  margin-bottom: 1.5rem;
}

.live-test-box .section-title.small {
  font-size: 1.2rem;
}

.live-test-box .test-container {
  text-align: center;
}

.live-test-box .test-result {
  margin-top: 1.5rem;
  text-align: left;
}

.test-result pre {
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  font-size: 0.85rem;
}

.test-result pre.success {
  border-color: rgba(16, 185, 129, 0.5);
  color: var(--accent-green);
}

.test-result pre.error {
  border-color: rgba(239, 68, 68, 0.5);
  color: var(--accent-red);
}

.test-result .loading {
  color: var(--accent-cyan);
  animation: blink 1s infinite;
}

/* ===============================
   RESPONSIVE DESIGN
   =============================== */

@media (max-width: 1000px) {
  .test-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .endpoints-column {
    order: 1;
  }

  .schema-column {
    order: 2;
  }
}

@media (max-width: 600px) {
  .schema-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 1rem;
  }

  .schema-row.header {
    display: none;
  }

  .schema-row .field-name::before {
    content: "Field: ";
    color: var(--text-muted);
    font-size: 0.7rem;
  }

  .schema-row .field-type::before {
    content: "Type: ";
    color: var(--text-muted);
    font-size: 0.7rem;
  }

  .schema-row .field-desc::before {
    content: "Description: ";
    color: var(--text-muted);
    font-size: 0.7rem;
  }
}
