/*
- ReadyAPI.net — Futuristic Dark Theme Documentation
- Hides Swagger's top explore bar and aligns with ReadyAPI UI style.
*/

/* 1. Fondo principal de la página (Tema Oscuro Futurista) */
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: #080c14 !important;
  color: #e2e8f0 !important;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

body {
  background-image: radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.08) 0%, transparent 75%) !important;
}

/* 2. Ocultar la barra superior negra/verde de Swagger */
html body .swagger-ui .topbar,
html body #swagger-ui .swagger-ui .scheme-container,
html body #swagger-ui .swagger-ui .topbar-wrapper {
  display: none !important;
}

/* 3. Estilo del Header de ReadyAPI */
.rapi-docs-header {
  width: 100%;
  box-sizing: border-box;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.rapi-docs-header .rapi-header-inner {
  max-width: 1460px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.rapi-docs-header .rapi-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.rapi-docs-header .rapi-brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
}

.rapi-docs-header .rapi-brand-name {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rapi-docs-header .rapi-brand-sub {
  color: #38bdf8;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rapi-docs-header .rapi-btn-home {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.rapi-docs-header .rapi-btn-home:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

/* 4. Contenedor principal Swagger UI */
#swagger-ui {
  max-width: 1460px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  box-sizing: border-box;
}

html body #swagger-ui .swagger-ui {
  color: #94a3b8 !important;
  font-family: inherit !important;
}

/* Títulos y Descripciones Principales */
html body #swagger-ui .swagger-ui .info .title,
html body #swagger-ui .swagger-ui .info h1,
html body #swagger-ui .swagger-ui .info h2,
html body #swagger-ui .swagger-ui .info h3,
html body #swagger-ui .swagger-ui .opblock-tag {
  color: #f8fafc !important;
  font-weight: 700 !important;
}

html body #swagger-ui .swagger-ui .info p,
html body #swagger-ui .swagger-ui .info li,
html body #swagger-ui .swagger-ui .markdown p,
html body #swagger-ui .swagger-ui .renderedMarkdown p {
  color: #94a3b8 !important;
}

/* 5. Buscador de etiquetas (Filter by tag) */
html body #swagger-ui .swagger-ui input[type="text"] {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  color: #f8fafc !important;
  padding: 10px 14px !important;
}

html body #swagger-ui .swagger-ui input[type="text"]:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}

/* 6. Tarjetas de los Endpoints (Estilo UI Futurista) */
html body #swagger-ui .swagger-ui .opblock {
  background: rgba(15, 23, 42, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3) !important;
  margin-bottom: 12px !important;
  backdrop-filter: blur(8px);
}

/* Ruta del endpoint (ej. /api/v1/search/query) */
html body #swagger-ui .swagger-ui .opblock .opblock-summary-path {
  color: #f1f5f9 !important;
  font-family: monospace !important;
  font-weight: 600 !important;
}

/* Textos de la derecha (IDs de la operación) y descripciones en Azul Futurista */
html body #swagger-ui .swagger-ui .opblock .opblock-summary-operation-id,
html body #swagger-ui .swagger-ui .opblock .opblock-summary-description {
  color: #38bdf8 !important;
  font-weight: 500 !important;
}

/* Flechas de ocultar/desplegar en Azul Futurista */
html body #swagger-ui .swagger-ui .opblock .opblock-summary-control svg,
html body #swagger-ui .swagger-ui .opblock-tag small,
html body #swagger-ui .swagger-ui .arrow,
html body #swagger-ui .swagger-ui .opblock-control-arrow,
html body #swagger-ui .swagger-ui .expand-operation,
html body #swagger-ui .swagger-ui .opblock-tag [data-name] svg {
  fill: #38bdf8 !important;
  color: #38bdf8 !important;
}

/* 7. Cajas desplegadas y tablas */
html body #swagger-ui .swagger-ui .opblock-body {
  background: rgba(11, 15, 25, 0.6) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

html body #swagger-ui .swagger-ui table,
html body #swagger-ui .swagger-ui td,
html body #swagger-ui .swagger-ui th,
html body #swagger-ui .swagger-ui label,
html body #swagger-ui .swagger-ui .parameter__name,
html body #swagger-ui .swagger-ui .parameter__type,
html body #swagger-ui .swagger-ui .response-col_status,
html body #swagger-ui .swagger-ui .response-col_description,
html body #swagger-ui .swagger-ui .model-title,
html body #swagger-ui .swagger-ui .prop-type {
  color: #cbd5e1 !important;
}

/* 8. Modelos y Schemas */
html body #swagger-ui .swagger-ui section.models {
  background: rgba(15, 23, 42, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
}

html body #swagger-ui .swagger-ui section.models h4 {
  color: #f8fafc !important;
}

/* 9. Adaptación responsive */
@media (max-width: 640px) {
  #swagger-ui {
    padding: 1rem 0.75rem 2rem;
  }
}