/* ============================================================
   Clean, minimal Swagger UI customization for light theme
   ============================================================ */

/* --- Top bar cleanup --- */
.swagger-ui .topbar {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  margin: 0 !important;
  padding: 0.5rem 0 !important;
}

/* Hide the Swagger logo/link */
.swagger-ui .topbar .link,
.swagger-ui .topbar .link img {
  display: none !important;
}

/* Hide URL input + Explore button, keep only service dropdown */
.swagger-ui .download-url-wrapper input[type="text"],
.swagger-ui .download-url-wrapper .download-url-input,
.swagger-ui .download-url-wrapper button[type="submit"],
.swagger-ui .download-url-wrapper .download-url-button {
  display: none !important;
}

.swagger-ui .download-url-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

/* Style the service dropdown (Select a definition) */
.swagger-ui .download-url-wrapper select {
  display: inline-block !important;
  background: #fff !important;
  color: #6e6e6e !important;
  border: 1px solid #6e6e6e !important;
  border-radius: 4px !important;
  padding: 0.2rem 0.4rem !important;
  font-family: inherit !important;
  font-size: inherit !important;
}
.swagger-ui .download-url-wrapper label {
  color: #6e6e6e !important;
  opacity: 1 !important;
  font-weight: 500 !important;
}

/* Remove top spacing above content */
.swagger-ui .swagger-container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ============================================================
   API title area and layout
   ============================================================ */

/* Make the title area flexible so the Authorize button can sit inline */
.swagger-ui .information-container.wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Reduce title size for better visual hierarchy */
.swagger-ui .info .title {
  font-size: 2rem !important;
  line-height: 1.2 !important;
}


/* ============================================================
   Hide Servers area (JS moves Authorize button up)
   ============================================================ */

/* Hide “Servers” label and container completely */
.swagger-ui .scheme-container,
.swagger-ui .scheme-container .servers,
.swagger-ui .scheme-container .servers > label,
.swagger-ui .scheme-container .servers h4,
.swagger-ui .scheme-container .servers .servers-title {
  display: none !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Ensure no empty spacing remains after removing Servers */
.swagger-ui .scheme-container + .opblock-tag-section {
  margin-top: 1rem !important;
}

/* ============================================================
   General cleanup
   ============================================================ */

/* Remove any empty borders/shadows left by Swagger defaults */
.swagger-ui .info,
.swagger-ui .information-container {
  box-shadow: none !important;
  border: none !important;
}

/* Keep light text color for consistency */
.swagger-ui,
.swagger-ui * {
  color-scheme: light !important;
}

.swagger-ui .info__extdocs.link {
  display: none !important;
}

/* Kill the dark overlay behind the Authorize modal */
.swagger-ui .dialog-ux__backdrop,
.swagger-ui .dialog-ux--backdrop,
.swagger-ui .modal-ux__backdrop,
.swagger-ui .modal-ux--backdrop,
.swagger-ui .modal-ux-overlay,
.swagger-ui .overlay-ux,
.swagger-ui .backdrop-ux,
.swagger-ui .modal-backdrop,
.swagger-ui [class*="backdrop"],
.swagger-ui [class*="overlay"] {
  background: transparent !important;
  opacity: 0 !important;
  backdrop-filter: none !important;
  pointer-events: none !important; /* allow clicks behind if you want */
}

/* Keep the modal panel itself fully visible */
.swagger-ui .modal-ux,
.swagger-ui .dialog-ux {
  z-index: 10000 !important;
}

/* Hide the long "Scopes are used to grant..." description in the auth modal */
.swagger-ui .auth-container .auth-container__description,
.swagger-ui .auth-container p,
.swagger-ui .auth-wrapper p,
.swagger-ui .modal-ux-content > p:first-of-type {
  display: none !important;
}

/* Hide only the title text, keep badges inside the same <h2> */
.swagger-ui .info hgroup.main > h2.title {
  font-size: 0 !important;      /* collapses the plain text */
  line-height: 0 !important;
  margin: 0 0 .5rem 0 !important;
}

/* Restore size for child elements (badges, tags, etc.) */
.swagger-ui .info hgroup.main > h2.title > * {
  font-size: 1rem !important;    /* tweak as needed (1rem–1.25rem) */
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

/* optional: tighten spacing between badges */
.swagger-ui .info hgroup.main > h2.title > * + * {
  margin-left: .4rem !important;
}
