/* ── Animated highlight for the "Guia de Integracao" link ── */
/* Applies in BOTH light and dark themes */

@keyframes docs-link-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Highlighted link — class applied via JS to all a[href="/docs"] */
.swagger-ui .docs-guide-link,
.swagger-ui .info .docs-guide-link,
.swagger-ui .renderedMarkdown .docs-guide-link,
.swagger-ui a.docs-guide-link,
.swagger-ui a.docs-guide-link:visited,
.swagger-ui a.docs-guide-link:active {
  display: inline-block !important;
  padding: 10px 24px !important;
  border-radius: 8px !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  letter-spacing: .03em !important;
  text-decoration: none !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.4) !important;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6) !important;
  background-size: 200% auto !important;
  animation: docs-link-shimmer 3s ease-in-out infinite !important;
  transition: box-shadow .3s ease, transform .2s ease !important;
  box-shadow: 0 2px 10px rgba(59, 130, 246, .35) !important;
}

.swagger-ui .docs-guide-link:hover,
.swagger-ui a.docs-guide-link:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, .5) !important;
  color: #ffffff !important;
}

/* Swagger UI Dark Theme — toggled via [data-theme="dark"] on <html> */

[data-theme="dark"] body {
  background: #1a1a2e !important;
  color: #e0e0e0 !important;
}

[data-theme="dark"] .swagger-ui {
  color: #c9d1d9 !important;
}

/* Topbar */
[data-theme="dark"] .swagger-ui .topbar {
  background: #0d1117 !important;
  border-bottom: 1px solid #30363d !important;
}

/* Info section */
[data-theme="dark"] .swagger-ui .info {
  border-bottom-color: #30363d !important;
}

[data-theme="dark"] .swagger-ui .info .title,
[data-theme="dark"] .swagger-ui .info h1,
[data-theme="dark"] .swagger-ui .info h2,
[data-theme="dark"] .swagger-ui .info h3,
[data-theme="dark"] .swagger-ui .info h4 {
  color: #e6edf3 !important;
}

[data-theme="dark"] .swagger-ui .info .title small pre {
  background: #161b22 !important;
  color: #7ee787 !important;
  border-color: #30363d !important;
}

[data-theme="dark"] .swagger-ui .info .description p,
[data-theme="dark"] .swagger-ui .info .description li,
[data-theme="dark"] .swagger-ui .info .description div {
  color: #c9d1d9 !important;
}

[data-theme="dark"] .swagger-ui .info a {
  color: #58a6ff !important;
}

/* Operation blocks */
[data-theme="dark"] .swagger-ui .opblock {
  border-color: #30363d !important;
  background: #161b22 !important;
}

[data-theme="dark"] .swagger-ui .opblock .opblock-summary {
  border-color: #30363d !important;
}

[data-theme="dark"] .swagger-ui .opblock .opblock-summary-description {
  color: #8b949e !important;
}

/* Endpoint path (e.g. /api/v1/baskets/{id}) — must be clearly readable */
[data-theme="dark"] .swagger-ui .opblock .opblock-summary-path,
[data-theme="dark"] .swagger-ui .opblock .opblock-summary-path a,
[data-theme="dark"] .swagger-ui .opblock .opblock-summary-path span {
  color: #e6edf3 !important;
}

[data-theme="dark"] .swagger-ui .opblock .opblock-summary-path__deprecated {
  color: #8b949e !important;
}

/* Operation method badge text */
[data-theme="dark"] .swagger-ui .opblock .opblock-summary-method {
  color: #fff !important;
}

[data-theme="dark"] .swagger-ui .opblock.opblock-get .opblock-summary {
  background: rgba(56, 132, 244, 0.1) !important;
  border-color: #1f6feb !important;
}

[data-theme="dark"] .swagger-ui .opblock.opblock-post .opblock-summary {
  background: rgba(63, 185, 80, 0.1) !important;
  border-color: #238636 !important;
}

[data-theme="dark"] .swagger-ui .opblock.opblock-put .opblock-summary {
  background: rgba(210, 153, 34, 0.1) !important;
  border-color: #9e6a03 !important;
}

[data-theme="dark"] .swagger-ui .opblock.opblock-delete .opblock-summary {
  background: rgba(248, 81, 73, 0.1) !important;
  border-color: #da3633 !important;
}

[data-theme="dark"] .swagger-ui .opblock .opblock-body {
  background: #0d1117 !important;
}

/* Models */
[data-theme="dark"] .swagger-ui .model-box,
[data-theme="dark"] .swagger-ui section.models {
  background: #161b22 !important;
  border-color: #30363d !important;
}

[data-theme="dark"] .swagger-ui section.models h4 {
  color: #e6edf3 !important;
  border-color: #30363d !important;
}

[data-theme="dark"] .swagger-ui .model {
  color: #c9d1d9 !important;
}

[data-theme="dark"] .swagger-ui .model-title {
  color: #e6edf3 !important;
}

/* Tables */
[data-theme="dark"] .swagger-ui table thead tr th,
[data-theme="dark"] .swagger-ui table thead tr td {
  color: #e6edf3 !important;
  border-color: #30363d !important;
}

[data-theme="dark"] .swagger-ui table tbody tr td {
  color: #c9d1d9 !important;
  border-color: #30363d !important;
}

[data-theme="dark"] .swagger-ui .parameters-col_description p,
[data-theme="dark"] .swagger-ui .parameters-col_description input,
[data-theme="dark"] .swagger-ui .parameter__name {
  color: #c9d1d9 !important;
}

/* Inputs and selects */
[data-theme="dark"] .swagger-ui input[type=text],
[data-theme="dark"] .swagger-ui input[type=password],
[data-theme="dark"] .swagger-ui input[type=email],
[data-theme="dark"] .swagger-ui textarea,
[data-theme="dark"] .swagger-ui select {
  background: #0d1117 !important;
  color: #c9d1d9 !important;
  border-color: #30363d !important;
}

/* Code blocks and responses */
[data-theme="dark"] .swagger-ui .highlight-code,
[data-theme="dark"] .swagger-ui .microlight,
[data-theme="dark"] .swagger-ui pre {
  background: #0d1117 !important;
  color: #c9d1d9 !important;
  border-color: #30363d !important;
}

[data-theme="dark"] .swagger-ui .response-col_description__inner p,
[data-theme="dark"] .swagger-ui .response-col_description p {
  color: #c9d1d9 !important;
}

[data-theme="dark"] .swagger-ui .responses-inner h4,
[data-theme="dark"] .swagger-ui .responses-inner h5,
[data-theme="dark"] .swagger-ui .opblock-section-header h4 {
  color: #e6edf3 !important;
}

[data-theme="dark"] .swagger-ui .opblock-section-header {
  background: #161b22 !important;
  border-color: #30363d !important;
}

/* Try it out */
[data-theme="dark"] .swagger-ui .try-out__btn {
  border-color: #58a6ff !important;
  color: #58a6ff !important;
}

/* Authorize button and dialog */
[data-theme="dark"] .swagger-ui .auth-wrapper .authorize {
  border-color: #3fb950 !important;
  color: #3fb950 !important;
}

[data-theme="dark"] .swagger-ui .dialog-ux .modal-ux {
  background: #161b22 !important;
  border-color: #30363d !important;
}

[data-theme="dark"] .swagger-ui .dialog-ux .modal-ux-header h3 {
  color: #e6edf3 !important;
}

[data-theme="dark"] .swagger-ui .dialog-ux .modal-ux-content p {
  color: #c9d1d9 !important;
}

/* Scheme container */
[data-theme="dark"] .swagger-ui .scheme-container {
  background: #161b22 !important;
  border-color: #30363d !important;
  box-shadow: none !important;
}

/* Tags / section headers */
[data-theme="dark"] .swagger-ui .opblock-tag {
  color: #e6edf3 !important;
  border-color: #30363d !important;
}

[data-theme="dark"] .swagger-ui .opblock-tag:hover {
  background: rgba(88, 166, 255, 0.05) !important;
}

[data-theme="dark"] .swagger-ui .opblock-tag small {
  color: #8b949e !important;
}

/* Markdown inside descriptions */
[data-theme="dark"] .swagger-ui .renderedMarkdown p,
[data-theme="dark"] .swagger-ui .renderedMarkdown li,
[data-theme="dark"] .swagger-ui .renderedMarkdown code {
  color: #c9d1d9 !important;
}

[data-theme="dark"] .swagger-ui .renderedMarkdown code {
  background: #0d1117 !important;
  border-radius: 3px;
  padding: 2px 5px;
}

[data-theme="dark"] .swagger-ui .renderedMarkdown pre {
  background: #0d1117 !important;
  border: 1px solid #30363d !important;
  border-radius: 6px;
  padding: 12px;
}

[data-theme="dark"] .swagger-ui .renderedMarkdown a {
  color: #58a6ff !important;
}

[data-theme="dark"] .swagger-ui .renderedMarkdown h1,
[data-theme="dark"] .swagger-ui .renderedMarkdown h2,
[data-theme="dark"] .swagger-ui .renderedMarkdown h3,
[data-theme="dark"] .swagger-ui .renderedMarkdown h4,
[data-theme="dark"] .swagger-ui .renderedMarkdown h5 {
  color: #e6edf3 !important;
}

[data-theme="dark"] .swagger-ui .renderedMarkdown blockquote {
  border-left-color: #30363d !important;
  color: #8b949e !important;
}

/* Lock icon */
[data-theme="dark"] .swagger-ui .authorization__btn svg {
  fill: #8b949e !important;
}

/* Filter bar */
[data-theme="dark"] .swagger-ui .filter-container input {
  background: #0d1117 !important;
  color: #c9d1d9 !important;
  border-color: #30363d !important;
}

/* Loading */
[data-theme="dark"] .swagger-ui .loading-container {
  background: #0d1117 !important;
}

/* Wrapper and base overrides */
[data-theme="dark"] .swagger-ui .wrapper {
  background: #0d1117 !important;
}

[data-theme="dark"] .swagger-ui .opblock-description-wrapper p,
[data-theme="dark"] .swagger-ui .opblock-external-docs-wrapper p,
[data-theme="dark"] .swagger-ui .opblock-title_normal p,
[data-theme="dark"] .swagger-ui label,
[data-theme="dark"] .swagger-ui .parameter__type,
[data-theme="dark"] .swagger-ui .parameter__deprecated,
[data-theme="dark"] .swagger-ui .parameter__in,
[data-theme="dark"] .swagger-ui .response-col_status,
[data-theme="dark"] .swagger-ui .response-col_links,
[data-theme="dark"] .swagger-ui .response .response-col_description__inner span,
[data-theme="dark"] .swagger-ui .btn {
  color: #c9d1d9 !important;
}

[data-theme="dark"] .swagger-ui .opblock-body pre.microlight,
[data-theme="dark"] .swagger-ui .opblock-body pre {
  background: #0d1117 !important;
  color: #c9d1d9 !important;
  border: 1px solid #30363d !important;
  border-radius: 6px !important;
}

[data-theme="dark"] .swagger-ui .copy-to-clipboard {
  background: #161b22 !important;
}

[data-theme="dark"] .swagger-ui .copy-to-clipboard button {
  background: #161b22 !important;
}

[data-theme="dark"] .swagger-ui .download-contents {
  background: #161b22 !important;
  color: #58a6ff !important;
}

/* Response section */
[data-theme="dark"] .swagger-ui .responses-table thead td {
  color: #8b949e !important;
  border-color: #30363d !important;
}

[data-theme="dark"] .swagger-ui .response-col_description {
  color: #c9d1d9 !important;
}

/* Execute button */
[data-theme="dark"] .swagger-ui .btn.execute {
  background: #238636 !important;
  border-color: #238636 !important;
  color: #fff !important;
}

[data-theme="dark"] .swagger-ui .btn.cancel {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #c9d1d9 !important;
}

/* Tab headers */
[data-theme="dark"] .swagger-ui .tab li {
  color: #8b949e !important;
}

[data-theme="dark"] .swagger-ui .tab li.active {
  color: #c9d1d9 !important;
}

/* Live response */
[data-theme="dark"] .swagger-ui .live-responses-table .response-col_status {
  color: #c9d1d9 !important;
}

[data-theme="dark"] .swagger-ui .request-url pre {
  background: #0d1117 !important;
  color: #58a6ff !important;
  border-color: #30363d !important;
}

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar { width: 8px; height: 8px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: #161b22; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #484f58; }
