/* FYIsoft Swagger UI custom branding */
/* Brand palette extracted from fyisoft.com */
/* Primary: #80C936 (green), Secondary text: #2F2F2F, Accent cyan: #72D3E4 */

/* Overall typography */
html, body, .swagger-ui {
  font-family: "Lato", -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

/* Layout: make footer truly bottom by flexing page */
.swagger-ui { display: flex; flex-direction: column; min-height: 100vh; }
.swagger-ui > .topbar { flex: 0 0 auto; }
.swagger-ui > .wrapper { flex: 1 0 auto; }

/* Topbar branding */
.swagger-ui .topbar {
  background: #2F2F2F;
  border-bottom: 3px solid #80C936;
}
.swagger-ui .topbar .download-url-wrapper { display: none; }
/* Hide default Swagger link; we’ll re-add branding in footer */
.swagger-ui .topbar .link { display: none !important; }

/* Custom brand container */
#fyi-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
#fyi-brand .brand-logo {
  width: 160px;
  height: 40px;
  background: url('/swagger/fyisoft-logo.png') no-repeat center center;
  background-size: contain;
}
#fyi-brand .brand-title {
  color: #FFFFFF;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Header controls */
#fyi-header-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
#fyi-header-controls input[type="text"],
#fyi-header-controls input[type="password"] {
  height: 32px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #1f1f1f;
  color: #eee;
  min-width: 220px;
}
#fyi-header-controls input::placeholder { color: #aaa; }
#fyi-header-controls .btn {
  background: #80C936;
  color: #1b1b1b;
  border: none;
  font-weight: 700;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
}
#fyi-header-controls .btn.secondary {
  background: transparent;
  color: #eee;
  border: 1px solid #72D3E4;
}

/* Buttons and accents */
.swagger-ui .btn.authorize, .swagger-ui .authorize__btn {
  background-color: #80C936 !important;
  color: #1b1b1b !important;
  border-color: #80C936 !important;
}
.swagger-ui .btn.execute { background-color: #80C936; border-color: #80C936; }
.swagger-ui .btn.try-out { color: #2F2F2F; border-color: #80C936; }
.swagger-ui .btn.cancel { color: #2F2F2F; border-color: #777; }

/* Tags and section headers */
.swagger-ui .opblock-tag {
  background: #F5F7F8;
  border-left: 4px solid #80C936;
  padding-left: 10px;
}
.swagger-ui .opblock .opblock-summary-method {
  background: #2F2F2F !important;
}

/* Links */
.swagger-ui .info a { color: #2F2F2F; border-bottom: 1px dashed #80C936; }

/* Tables and markdown */
.swagger-ui table thead tr th { background: #F5F7F8; }
.swagger-ui .model-title__text { color: #2F2F2F; }

/* Make the API title span wider and reduce excess whitespace */
.swagger-ui .wrapper { max-width: 1200px; padding-left: 20px; padding-right: 20px; }
.swagger-ui .information-container { padding-top: 8px; padding-bottom: 8px; }
.swagger-ui .info { max-width: 100%; margin: 6px 0 4px 0; }
.swagger-ui .info .title { font-size: 40px; line-height: 1.15; width: 100%; letter-spacing: .2px; margin: 0 0 6px 0; }
.swagger-ui .info .description { max-width: 72ch; }
.swagger-ui .scheme-container { margin: 8px 0 14px 0; padding: 8px 0; box-shadow: none; border: 1px solid #e7eaee; border-radius: 8px; }
.swagger-ui .opblock-tag { margin: 14px 0 8px 0; }
.swagger-ui .opblock { margin: 6px 0 10px 0; }
.swagger-ui .models { margin: 8px 0 20px; }

/* Small screen adjustments */
@media (max-width: 992px) {
  #fyi-header-controls { flex-wrap: wrap; }
  #fyi-header-controls input { min-width: 160px; }
}

/* Footer (minimal, pinned to bottom of content) */
#fyi-footer { margin-top: 16px; padding: 10px 0 18px 0; border-top: 1px solid #e3e7eb; background: transparent; }
#fyi-footer .inner { display: flex; align-items: center; gap: 10px; color: #6b6b6b; font-size: 12px; }
#fyi-footer .sb { display: inline-flex; align-items: center; gap: 6px; color: #6b6b6b; text-decoration: none; }
#fyi-footer .sb:hover { color: #2F2F2F; }
#fyi-footer .sb .ico { width: 16px; height: 16px; display: inline-block; }
#fyi-footer .muted { color: #9aa0a6; margin-left: auto; }
