/* ─── Layout ──────────────────────────────────────────────────────────────── */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */
.app-header {
  background: #013369;
  color: white;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right label {
  font-size: 0.85rem;
  font-weight: 500;
}

.header-right select {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 0.85rem;
  cursor: pointer;
}

.header-right select option {
  color: #333;
  background: white;
}

/* ─── Auth Panels ─────────────────────────────────────────────────────────── */
.auth-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px 24px;
  background: #f5f7fa;
  border-bottom: 1px solid #ddd;
}

@media (max-width: 900px) {
  .auth-panels {
    grid-template-columns: 1fr;
  }
}

.auth-panel {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px 20px;
}

.auth-panel h3 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: #013369;
}

.auth-description {
  font-size: 0.82rem;
  color: #666;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.auth-description code {
  background: #f0f0f0;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.8rem;
}

/* ─── Auth Status ─────────────────────────────────────────────────────────── */
#internal-auth-status,
#external-auth-status {
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.auth-success {
  color: #2e7d32;
  font-weight: 600;
}

.auth-none {
  color: #888;
  font-style: italic;
}

.auth-error {
  background: #ffebee;
  color: #c62828;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.82rem;
  margin-top: 8px;
}

/* ─── Form ────────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 8px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 3px;
  color: #444;
}

.form-group input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #013369;
  box-shadow: 0 0 0 2px rgba(1, 51, 105, 0.15);
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  padding: 7px 16px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: #013369;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #01245a;
}

.btn-danger {
  background: #d32f2f;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #b71c1c;
}

.auth-actions {
  margin-top: 10px;
}

/* ─── Credentials Info ────────────────────────────────────────────────────── */
.creds-detail {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.6;
  margin-top: 8px;
  word-break: break-all;
}

.creds-detail code {
  background: #e8e8e8;
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 0.75rem;
}

/* ─── Swagger UI Overrides ────────────────────────────────────────────────── */
#swagger-ui {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hide the default Swagger UI authorize button since we have custom auth panels */
.swagger-ui .auth-wrapper .authorize {
  display: none;
}

/* NFL-themed operation tag colors */
.swagger-ui .opblock-tag {
  border-bottom-color: #013369 !important;
}

.swagger-ui .opblock.opblock-get .opblock-summary-method {
  background: #013369;
}

.swagger-ui .opblock.opblock-post .opblock-summary-method {
  background: #d50a0a;
}

/* Info header styling */
.swagger-ui .info .title {
  color: #013369;
}
