/**
 * Custom CSS for Swagger UI to better match Material theme with Midaxo colors
 */

/* Global font reset for Swagger UI */
.swagger-ui,
.swagger-ui *:not(pre):not(code) {
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

/* Monospace font for code elements */
.swagger-ui pre,
.swagger-ui code,
.swagger-ui .model .property,
.swagger-ui .property-name,
.swagger-ui .property-type {
  font-family: 'Roboto Mono', SFMono-Regular, Consolas, Menlo, monospace !important;
}

/* Typography scale to match Material Design */
.swagger-ui .info .title {
  font-size: 2rem !important;
  font-weight: 300 !important;
  /* Color is set in midaxo-colors.css */
}

.swagger-ui h2,
.swagger-ui .info h2 {
  font-size: 1.8rem !important;
  font-weight: 300 !important;
}

.swagger-ui h3,
.swagger-ui .info h3,
.swagger-ui .opblock-tag {
  font-size: 1.4rem !important;
  font-weight: 400 !important;
}

.swagger-ui h4,
.swagger-ui h5,
.swagger-ui h6,
.swagger-ui .opblock-summary-description {
  font-size: 1rem !important;
  font-weight: 500 !important;
}

.swagger-ui p,
.swagger-ui td,
.swagger-ui li,
.swagger-ui label {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

/* Material design colors - overridden in midaxo-colors.css */
/* Container styling */
.swagger-ui .opblock,
.swagger-ui .model-box,
.swagger-ui .model-container,
.swagger-ui .opblock-summary,
.swagger-ui select,
.swagger-ui input[type='text'],
.swagger-ui textarea {
  border-radius: 4px !important;
}

/* Table styling */
.swagger-ui table {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}

.swagger-ui table thead tr th {
  background-color: #f5f5f5 !important;
}

/* Models section */
.swagger-ui section.models {
  border-radius: 4px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}

/* Layout adjustments for better alignment */
.swagger-ui .wrapper {
  padding: 0 !important;
  max-width: none !important;
}

.swagger-ui .information-container {
  padding: 0 !important;
  margin: 0 !important;
}

.swagger-ui .information-container .info {
  margin: 0 !important;
  padding: 1rem 0 !important;
}

/* Improve spacing for collapsible sections */
.swagger-ui .opblock-body {
  padding-bottom: 1rem !important;
}

.swagger-ui .expand-operation {
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

/* Ensure proper rendering of expanded content */
.swagger-ui .opblock.is-open .opblock-body {
  padding-top: 1rem !important;
  height: auto !important;
}
