/* ─────────────────────────────────────────────────────────────
   Microframe Sports — Developer Portal  |  Swagger UI Theme
   ───────────────────────────────────────────────────────────── */

/* ── Base font ── */
.swagger-ui,
.swagger-ui * {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Topbar ── */
.swagger-ui .topbar {
  background: #0b1929;
  padding: 14px 28px;
  border-bottom: 3px solid #1565c0;
}
.swagger-ui .topbar .download-url-wrapper { display: none; }
.swagger-ui .topbar-wrapper { align-items: center; }
.swagger-ui .topbar-wrapper .link { display: none; }
.swagger-ui .topbar-wrapper::before {
  content: "Microframe Sports  —  Developer Portal";
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ── Page background ── */
body { background: #f4f6f9; }

/* ── Info section ── */
.swagger-ui .info { margin: 36px 0 28px; }
.swagger-ui .info .title { color: #0b1929; font-size: 26px; font-weight: 800; }
.swagger-ui .info .version {
  background: #1565c0;
  color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  vertical-align: middle;
  margin-left: 8px;
}

/* Markdown in description */
.swagger-ui .info .description p  { color: #374151; line-height: 1.75; margin-bottom: 10px; }
.swagger-ui .info .description h2 { color: #0b1929; font-size: 20px; font-weight: 700; margin: 24px 0 10px; }
.swagger-ui .info .description h3 { color: #1565c0; font-size: 16px; font-weight: 700; margin: 20px 0 8px; }
.swagger-ui .info .description ul,
.swagger-ui .info .description ol  { color: #374151; padding-left: 20px; line-height: 1.75; }
.swagger-ui .info .description code {
  background: #e8edf5;
  color: #1565c0;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
}
.swagger-ui .info .description pre {
  background: #0b1929;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13px;
  overflow-x: auto;
}
.swagger-ui .info .description pre code { background: none; color: inherit; padding: 0; }
.swagger-ui .info .description table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.swagger-ui .info .description table th {
  background: #0b1929;
  color: #fff;
  padding: 8px 14px;
  font-size: 12px;
  text-align: left;
  font-weight: 600;
}
.swagger-ui .info .description table td {
  padding: 8px 14px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  font-size: 13px;
}
.swagger-ui .info .description table tr:nth-child(even) td { background: #f9fafb; }
.swagger-ui .info .description hr { border: none; border-top: 1px solid #e5e7eb; margin: 20px 0; }
.swagger-ui .info .description blockquote {
  border-left: 3px solid #1565c0;
  background: #eff6ff;
  margin: 12px 0;
  padding: 10px 16px;
  border-radius: 0 6px 6px 0;
  color: #1e3a5f;
  font-size: 13px;
}

/* ── Auth / scheme container ── */
.swagger-ui .scheme-container {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 16px 24px;
  margin-bottom: 24px;
}
.swagger-ui .auth-wrapper .authorize {
  background: #1565c0;
  border-color: #1565c0;
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  padding: 7px 18px;
  transition: background 0.15s;
}
.swagger-ui .auth-wrapper .authorize:hover { background: #0d47a1; }
.swagger-ui .auth-wrapper .authorize svg { fill: #fff; }

/* ── Operation blocks ── */
.swagger-ui .opblock {
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  margin-bottom: 10px;
  border: 1.5px solid transparent;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.swagger-ui .opblock:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.11); }

/* POST */
.swagger-ui .opblock.opblock-post { background: #eff6ff; border-color: #1565c0; }
.swagger-ui .opblock.opblock-post .opblock-summary { background: #dbeafe; }
.swagger-ui .opblock.opblock-post .opblock-summary-method {
  background: #1565c0;
  border-radius: 5px;
  font-weight: 700;
  font-size: 12px;
  min-width: 64px;
  text-align: center;
  padding: 4px 0;
}

/* GET */
.swagger-ui .opblock.opblock-get { background: #f0fdf4; border-color: #15803d; }
.swagger-ui .opblock.opblock-get .opblock-summary { background: #dcfce7; }
.swagger-ui .opblock.opblock-get .opblock-summary-method {
  background: #15803d;
  border-radius: 5px;
  font-weight: 700;
  font-size: 12px;
  min-width: 64px;
  text-align: center;
  padding: 4px 0;
}

.swagger-ui .opblock-summary-path {
  color: #0b1929;
  font-weight: 600;
  font-size: 14px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.swagger-ui .opblock-summary-description { color: #6b7280; font-size: 13px; }

/* ── Operation body ── */
.swagger-ui .opblock-body { background: #fff; }
.swagger-ui table thead tr th {
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.swagger-ui .parameter__name {
  color: #0b1929;
  font-weight: 600;
  font-size: 13px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.swagger-ui .parameter__type { color: #6b7280; font-size: 11px; }

/* ── Inputs ── */
.swagger-ui input[type=text],
.swagger-ui input[type=email],
.swagger-ui input[type=password],
.swagger-ui textarea,
.swagger-ui select {
  border-radius: 6px;
  border: 1.5px solid #d1d5db;
  padding: 7px 11px;
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  color: #111827;
  width: 100%;
  box-sizing: border-box;
}
.swagger-ui input[type=text]:focus,
.swagger-ui input[type=email]:focus,
.swagger-ui input[type=password]:focus,
.swagger-ui textarea:focus,
.swagger-ui select:focus {
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21,101,192,0.12);
  outline: none;
}

/* ── Buttons ── */
.swagger-ui .btn { border-radius: 6px; font-weight: 600; font-size: 13px; padding: 7px 16px; transition: background 0.15s, border-color 0.15s; }
.swagger-ui .btn.execute { background: #1565c0; border-color: #1565c0; color: #fff; }
.swagger-ui .btn.execute:hover { background: #0d47a1; border-color: #0d47a1; }
.swagger-ui .btn.try-out__btn { border: 1.5px solid #1565c0; color: #1565c0; background: #fff; }
.swagger-ui .btn.try-out__btn:hover { background: #eff6ff; }
.swagger-ui .btn.try-out__btn.cancel { border-color: #dc2626; color: #dc2626; }
.swagger-ui .btn.try-out__btn.cancel:hover { background: #fef2f2; }
.swagger-ui .btn-clear { background: transparent; border: 1.5px solid #9ca3af; color: #6b7280; }
.swagger-ui .btn-clear:hover { border-color: #6b7280; color: #374151; }

/* ── Response section ── */
.swagger-ui .responses-wrapper { padding: 16px 20px; }
.swagger-ui .response-col_status { font-weight: 700; color: #0b1929; }
.swagger-ui table.responses-table tr.response:first-child .response-col_status { color: #15803d; }
.swagger-ui .highlight-code pre { background: #0b1929; border-radius: 8px; padding: 14px 18px; }
.swagger-ui .microlight { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 12px; }

/* ── Auth modal ── */
.swagger-ui .dialog-ux .modal-ux { border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.swagger-ui .dialog-ux .modal-ux-header { background: #0b1929; border-radius: 12px 12px 0 0; padding: 16px 24px; }
.swagger-ui .dialog-ux .modal-ux-header h3 { color: #fff; font-size: 16px; font-weight: 700; }
.swagger-ui .dialog-ux .modal-ux-content { padding: 24px; }

/* ── Section tags ── */
.swagger-ui .opblock-tag { border-bottom: 2px solid #e5e7eb; color: #0b1929; font-size: 18px; font-weight: 700; margin: 28px 0 12px; }

/* Hide schemas — not needed for integrators ── */
.swagger-ui section.models { display: none; }

/* ── Auth-required lock button — make it prominent ── */
/* Color the padlock icon amber when unlocked, green when locked */
.swagger-ui .opblock-summary button.authorization__btn svg {
  fill: #d97706;
  width: 18px;
  height: 18px;
}
.swagger-ui .opblock-summary button.authorization__btn.locked svg {
  fill: #15803d;
}
/* Add a visible "Authorize" label after the padlock icon */
.swagger-ui .opblock-summary button.authorization__btn::after {
  content: " Authorize";
  font-size: 11px;
  font-weight: 700;
  color: #d97706;
  letter-spacing: 0.3px;
  vertical-align: middle;
  margin-left: 3px;
}
.swagger-ui .opblock-summary button.authorization__btn.locked::after {
  color: #15803d;
  content: " Authorized";
}
/* Give the button a subtle background so it reads as interactive */
.swagger-ui .opblock-summary button.authorization__btn {
  background: rgba(217, 119, 6, 0.08);
  border: 1.5px solid #d97706;
  border-radius: 5px;
  padding: 3px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.swagger-ui .opblock-summary button.authorization__btn:hover {
  background: rgba(217, 119, 6, 0.16);
}
.swagger-ui .opblock-summary button.authorization__btn.locked {
  background: rgba(21, 128, 61, 0.08);
  border-color: #15803d;
}
.swagger-ui .opblock-summary button.authorization__btn.locked:hover {
  background: rgba(21, 128, 61, 0.16);
}

/* ── Auth-required badge pill injected by microframe.js ── */
.mf-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid #d97706;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: auto;
  white-space: nowrap;
  pointer-events: none;
  flex-shrink: 0;
}
.mf-auth-badge.authorized {
  background: rgba(21, 128, 61, 0.10);
  border-color: #15803d;
  color: #14532d;
}
