body {
  margin: 0;
  padding: 0;
}

/* Hide Redoc version badge - version is shown via the dropdown instead */
[data-role="redoc-summary"] span,
.api-info-header small,
h1 span {
  display: none !important;
}

/* ── Version bar ── */
.version-bar, .version-bar * {
  box-sizing: border-box;
}

.version-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 56px;
}

#redoc-container {
  padding-top: 56px;
}

.version-bar__logo {
  display: flex;
  align-items: center;
}

.version-bar__logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.version-bar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.version-bar__label {
  color: #9ca3af;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* ── Dropdown ── */
.version-select {
  position: relative;
}

.version-select__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #1f2937;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 75px;
  justify-content: space-between;
}

.version-select__btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.version-select__btn svg {
  width: 12px;
  height: 12px;
  fill: #6b7280;
  transition: transform 0.2s ease;
}

.version-select.open .version-select__btn svg {
  transform: rotate(180deg);
}

.version-select__badge {
  font-size: 10px;
  font-weight: 600;
  font-family: Montserrat, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: #10b981;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  margin-left: 4px;
}

.version-select__menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 75px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 10000;
}

.version-select.open .version-select__menu {
  display: block;
}

.version-select__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  color: #4b5563;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.version-select__item:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.version-select__item--active {
  color: #1f2937;
  background: #f9fafb;
  font-weight: 600;
}

.version-select__item--active::after {
  content: '\2713';
  color: #1f2937;
  font-weight: 700;
}

/* ── Loading ── */
.loading-overlay {
  display: none;
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: 9998;
  align-items: center;
  justify-content: center;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: #1f2937;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
