/*
 * MeuSimples API Documentation Frontend
 * Custom styling for the API documentation interface
 */

 :root {
  /* Main colors */
  --primary-color: #0d6efd;
  --primary-dark: #0a58ca;
  --primary-light: #cfe2ff;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;

  /* Method colors */
  --get-color: #28a745;
  --get-bg: #e8f5e9;
  --post-color: #0d6efd;
  --post-bg: #e3f2fd;
  --put-color: #ffc107;
  --put-bg: #fff8e1;
  --delete-color: #dc3545;
  --delete-bg: #ffebee;
  --patch-color: #6f42c1;
  --patch-bg: #f3e5f5;

  /* Spacing */
  --spacing-xs: 0.2rem;
  --spacing-sm: 0.4rem;
  --spacing-md: 0.8rem;
  --spacing-lg: 1.2rem;
  --spacing-xl: 1.6rem;

  /* Font sizes */
  --font-size-xs: 0.7rem;
  --font-size-sm: 0.8rem;
  --font-size-md: 0.9rem;
  --font-size-lg: 1.1rem;
  --font-size-xl: 1.3rem;

  /* Border radius */
  --border-radius-sm: 0.2rem;
  --border-radius-md: 0.3rem;
  --border-radius-lg: 0.4rem;

  /* Transitions */
  --transition-speed: 0.3s;
}

/* General Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--dark-color);
  line-height: 1.5;
  padding-bottom: var(--spacing-xl);
  font-size: var(--font-size-md);
}

h1 {
  font-size: 1.4rem; /* Reduced from 1.6rem for smaller title */
}

h2 {
  font-size: 1.2rem; /* Reduced from 1.4rem for smaller title */
}

h3 {
  font-size: 1.1rem; /* Reduced from 1.2rem for smaller title */
}

h4, h5, h6 {
  font-size: 0.9rem; /* Reduced from 1rem for smaller title */
}

.container-fluid {
  max-width: 1600px;
}

/* Header Styles */
header {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative; /* Voltando para relative */
  background: white;
  padding: 0.5rem 0;
}

.logo-container {
  background-color: white;
  border-radius: var(--border-radius-md);
  padding: var(--spacing-sm);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logo-container img {
  max-height: 20px; /* Reduced from 24px for smaller logo */
}

/* Navigation Styles */
#nav-list.sticky-top {
  z-index: 100;
  height: calc(100vh - 80px); /* Altura total da viewport menos o header */
  overflow-y: auto;
  position: sticky !important;
  top: 20px !important; /* Reduzido de 80px para 20px */
  background: white;
  transition: top 0.2s ease;
}

/* Ajuste para scrollbar do menu */
#nav-list.sticky-top::-webkit-scrollbar {
  width: 6px;
}

#nav-list.sticky-top::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

#nav-list.sticky-top::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

#nav-list.sticky-top::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.nav-tabs .nav-link {
  border: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  font-weight: 500;
  transition: all var(--transition-speed);
  font-size: var(--font-size-sm);
}

.nav-tabs .nav-link.active {
  border-bottom: 3px solid var(--primary-color);
  background-color: transparent;
}

.nav-tabs .nav-link:hover:not(.active) {
  border-bottom: 3px solid var(--primary-light);
}

/* Server Selection Styles */
.server-selector {
  background-color: var(--light-color);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-sm);
}

.server-description table {
  font-size: var(--font-size-sm);
}

.server-description code {
  font-size: var(--font-size-sm);
  background-color: #f5f5f5;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

.server-description tr.active {
  background-color: var(--primary-light);
}

.server-description th {
  background-color: var(--light-color);
  font-weight: 600;
}

.server-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: var(--spacing-xs);
}

.server-production {
  background-color: var(--success-color);
}

.server-beta {
  background-color: var(--warning-color);
}

.server-development {
  background-color: var(--info-color);
}

/* Authentication Styles */
.auth-container {
  background-color: var(--light-color);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.auth-form {
  background-color: var(--light-color);
  border: 1px solid #dee2e6;
}

.auth-form textarea {
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-sm);
  resize: vertical;
  min-height: 80px;
  max-height: 150px;
}

.token-display {
  font-family: 'Courier New', monospace;
  background-color: #f5f5f5;
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  word-break: break-all;
}

#token-result {
  animation: fadeIn 0.5s;
}

#token-display {
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-sm);
  overflow: hidden;
  text-overflow: ellipsis;
}

#copy-token-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

#generate-token-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* API Explorer Styles */
.table-selector {
  position: relative;
}

.table-dropdown {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid #ced4da;
  border-radius: var(--border-radius-md);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--spacing-md) center;
  background-size: 16px;
}

.table-group {
  font-weight: bold;
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: #f8f9fa;
}

.table-item {
  padding-left: var(--spacing-lg);
}

/* Autocomplete Styles */
.autocomplete-container {
  position: relative;
  width: 100%;
}

.autocomplete-container .input-group {
  margin: 0;
  display: flex;
  align-items: stretch;
}

.autocomplete-container .input-group input {
  border-right: none;
  flex: 1;
}

.autocomplete-container .input-group input:focus {
  box-shadow: none;
  border-color: #ced4da;
}

.autocomplete-container .input-group input:focus + button {
  border-color: #ced4da;
}

.autocomplete-container .input-group button {
  border-left: none;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  margin: 0;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 3;
}

.autocomplete-container .input-group button:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.autocomplete-container .input-group button:focus {
  box-shadow: none;
  border-color: #ced4da;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  z-index: 1000;
  display: none;
  margin-top: 2px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.autocomplete-dropdown .dropdown-item {
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.autocomplete-dropdown .dropdown-item:hover,
.autocomplete-dropdown .dropdown-item.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.autocomplete-dropdown .dropdown-item.active {
  font-weight: 500;
}

.autocomplete-dropdown .dropdown-item i {
  margin-right: 0.5rem;
}

.dropdown-header {
  padding: var(--spacing-sm) var(--spacing-md);
  font-weight: bold;
  font-size: var(--font-size-sm);
  background-color: var(--light-color);
  color: var(--primary-color);
  border-bottom: 1px solid #dee2e6;
  border-top: 1px solid #dee2e6;
  margin-top: var(--spacing-xs);
  position: sticky;
  top: 0;
  z-index: 1;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover, .dropdown-item.active {
  background-color: var(--light-color);
  color: var(--primary-color);
  font-weight: 500;
}

.dropdown-item .table-path {
  font-family: 'Courier New', monospace;
  color: var(--dark-color);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

.dropdown-item .table-method {
  font-size: var(--font-size-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  margin-left: var(--spacing-sm);
  color: white;
  font-weight: 500;
  flex-shrink: 0;
}

.dropdown-item .table-method.get {
  background-color: var(--get-color);
}

.dropdown-item .table-method.post {
  background-color: var(--post-color);
}

.dropdown-item .table-method.put {
  background-color: var(--put-color);
}

.dropdown-item .table-method.delete {
  background-color: var(--delete-color);
}

.dropdown-item .table-method.patch {
  background-color: var(--patch-color);
}

/* Method Tabs Styles */
.method-tabs {
  display: flex;
  margin-bottom: var(--spacing-md);
  border-bottom: 1px solid #dee2e6;
}

.method-tab {
  padding: var(--spacing-xs) var(--spacing-sm);
  cursor: pointer;
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
  margin-right: var(--spacing-xs);
  font-weight: 500;
  transition: background-color var(--transition-speed);
  font-size: var(--font-size-sm);
}

.method-tab.active {
  border: 1px solid #dee2e6;
  border-bottom: none;
  background-color: inherit; /* Will be overridden by specific method colors */
}

.method-tab.get {
  color: var(--get-color);
}

.method-tab.get.active {
  background-color: var(--get-bg);
}

.method-tab.post {
  color: var(--post-color);
}

.method-tab.post.active {
  background-color: var(--post-bg);
}

.method-tab.put {
  color: var(--put-color);
}

.method-tab.put.active {
  background-color: var(--put-bg);
}

.method-tab.delete {
  color: var(--delete-color);
}

.method-tab.delete.active {
  background-color: var(--delete-bg);
}

.method-tab.patch {
  color: var(--patch-color);
}

.method-tab.patch.active {
  background-color: var(--patch-bg);
}

/* Method Selection Styles */
.method-select,
.method-label {
    height: 38px; /* Altura padrão do Bootstrap para form-select */
    line-height: 38px;
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-md);
    border: 1px solid #ced4da;
    border-radius: var(--border-radius-md);
    display: inline-flex;
    align-items: center;
}

.method-label {
    min-width: 80px;
    text-align: center;
    justify-content: center;
    font-weight: 600;
    text-transform: uppercase;
}

.method-select {
    background-color: white;
}

/* Method Colors */
.method-label.get {
    background-color: var(--get-bg);
    color: var(--get-color);
    border-color: var(--get-border);
}

.method-label.post {
    background-color: var(--post-bg);
    color: var(--post-color);
    border-color: var(--post-border);
}

.method-label.put {
    background-color: var(--put-bg);
    color: var(--put-color);
    border-color: var(--put-border);
}

.method-label.delete {
    background-color: var(--delete-bg);
    color: var(--delete-color);
    border-color: var(--delete-border);
}

.method-label.patch {
    background-color: var(--patch-bg);
    color: var(--patch-color);
    border-color: var(--patch-border);
}

/* Method Badge Styles for Implementation Notes */
.method-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  font-size: var(--font-size-xs);
  color: white;
  margin-right: 5px;
  min-width: 50px;
  text-align: center;
}

.method-badge.get {
  background-color: var(--get-color);
}

.method-badge.post {
  background-color: var(--post-color);
}

.method-badge.put {
  background-color: var(--put-color);
}

.method-badge.delete {
  background-color: var(--delete-color);
}

.method-badge.patch {
  background-color: var(--patch-color);
}

/* Endpoint Details Styles */
.table-details {
  margin-top: var(--spacing-md);
}

.table-path {
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-md);
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: #f5f5f5;
  border-radius: var(--border-radius-md);
  margin-bottom: var(--spacing-md);
}

.table-description {
  margin-bottom: var(--spacing-md);
}

/* Parameters Table Styles */
.parameters-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-lg);
}

.parameters-table th,
.parameters-table td {
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 1px solid #dee2e6;
  font-size: var(--font-size-sm);
}

.parameters-table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.parameter-required {
  color: var(--danger-color);
  margin-left: var(--spacing-xs);
}

.parameter-type {
  font-family: 'Courier New', monospace;
  color: var(--secondary-color);
  font-size: var(--font-size-sm);
}

/* Code Examples Styles */
.code-example {
  background-color: #272822;
  color: #f8f8f2;
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--spacing-md);
  position: relative;
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-xs);
  overflow-x: auto;
}

.code-example pre {
  margin: 0;
  white-space: pre-wrap;
}

.code-copy-btn {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  color: #f8f8f2;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-speed);
}

.code-copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.language-selector {
  margin-bottom: var(--spacing-sm);
}

/* Sandbox Styles */
.sandbox-container {
  background-color: var(--light-color);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

/* Sandbox Method Styles */
#sandbox-method {
  font-weight: 500;
  transition: all var(--transition-speed);
  border-radius: 4px 0 0 4px !important; /* Arredondado apenas à esquerda */
}

#sandbox-method.GET {
  background-color: var(--get-color);
  border-color: var(--get-color);
}

#sandbox-method.POST {
  background-color: var(--post-color);
  border-color: var(--post-color);
}

#sandbox-method.PUT {
  background-color: var(--put-color);
  border-color: var(--put-color);
}

#sandbox-method.DELETE {
  background-color: var(--delete-color);
  border-color: var(--delete-color);
}

#sandbox-method.PATCH {
  background-color: var(--patch-color);
  border-color: var(--patch-color);
}

.sandbox-method-selector {
  display: flex;
  margin-bottom: var(--spacing-md);
}

.sandbox-method-btn {
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 1px solid #dee2e6;
  background-color: white;
  cursor: pointer;
  transition: all var(--transition-speed);
  font-size: var(--font-size-sm);
}

.sandbox-method-btn:first-child {
  border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
}

.sandbox-method-btn:last-child {
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

.sandbox-method-btn.active.get {
  background-color: var(--get-color);
  color: white;
  border-color: var(--get-color);
}

.sandbox-method-btn.active.post {
  background-color: var(--post-color);
  color: white;
  border-color: var(--post-color);
}

.sandbox-method-btn.active.put {
  background-color: var(--put-color);
  color: white;
  border-color: var(--put-color);
}

.sandbox-method-btn.active.delete {
  background-color: var(--delete-color);
  color: white;
  border-color: var(--delete-color);
}

.sandbox-url {
  display: flex;
  margin-bottom: var(--spacing-md);
}

.sandbox-url-server {
  background-color: #f5f5f5;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid #ced4da;
  border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
  font-family: 'Courier New', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sandbox-url-path {
  flex-grow: 1;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid #ced4da;
  border-left: none;
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
  font-family: 'Courier New', monospace;
}

.sandbox-params {
  margin-bottom: var(--spacing-md);
}

.sandbox-param-row {
  display: flex;
  margin-bottom: var(--spacing-sm);
}

.sandbox-param-name {
  width: 30%;
  padding: var(--spacing-sm);
  background-color: #f5f5f5;
  border: 1px solid #ced4da;
  border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
}

.sandbox-param-value {
  width: 70%;
  padding: var(--spacing-sm);
  border: 1px solid #ced4da;
  border-left: none;
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

.sandbox-request-body,
.sandbox-response-body {
  width: 100%;
  height: 150px;
  max-height: 60vh; /* Limitando a 60% da altura da viewport */
  padding: var(--spacing-sm);
  border: 1px solid #ced4da;
  border-radius: var(--border-radius-md);
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-sm);
  resize: vertical;
}

.h60 {
  overflow: auto;
  max-height: 60vh; /* Limitando a 60% da altura da viewport */
}

/* Response Styles */
.response-container {
  margin-top: var(--spacing-lg);
}

.response-status {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.response-status-success {
  background-color: var(--get-bg);
  color: var(--get-color);
}

.response-status-error {
  background-color: var(--delete-bg);
  color: var(--delete-color);
}

.response-time {
  font-size: var(--font-size-sm);
  color: var(--secondary-color);
  margin-bottom: var(--spacing-sm);
}

/* Relationship Diagram Styles */
.table-relationships-container {
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius-md);
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  width: 100%;
  height: 70vh;
  position: relative;
  background-color: #fcfcfc;
  overflow: hidden;
}

.zoom-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 5px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 5px;
}

.zoom-controls button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dee2e6;
  background-color: white;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-speed);
}

.zoom-controls button:hover {
  background-color: #f8f9fa;
  border-color: #ced4da;
}

.zoom-controls button:active {
  background-color: #e9ecef;
}

.zoom-controls button i {
  font-size: 16px;
}

.table-relationships-diagram {
  width: 100%;
  height: 100%;
  position: relative;
  overflow-y: scroll;
  overflow-x: scroll;
}

.relationships-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Ajuste para mobile */
@media (max-width: 768px) {
  .table-relationships-container {
    height: 60vh;
    padding: var(--spacing-xs);
  }

  .zoom-controls {
    top: 10px;
    right: 10px;
  }

  .zoom-controls button {
    width: 28px;
    height: 28px;
  }

  .zoom-controls button i {
    font-size: 14px;
  }
}

/* Estilos para os nós das tabelas */
.relationships-diagram .table-node {
  fill: #f8f9fa;
  stroke: #dee2e6;
  stroke-width: 1.5px;
  rx: 4px;
  ry: 4px;
}

.relationships-diagram .table-title {
  font-weight: bold;
  font-size: var(--font-size-sm);
  fill: var(--primary-color);
  text-anchor: middle;
}

/* Destaque para a chave primária */
.relationships-diagram .primary-key {
  font-weight: bold;
  fill: var(--primary-dark);
  font-size: var(--font-size-sm);
}

.relationships-diagram .primary-key-icon {
  fill: var(--primary-color);
}

.relationships-diagram .table-field {
  font-size: var(--font-size-xs);
  fill: var(--dark-color);
}

.relationships-diagram .foreign-key {
  fill: var(--secondary-color);
  font-style: italic;
}

/* Estilos para as linhas de relacionamento */
.relationships-diagram .relationship-line {
  stroke: var(--secondary-color);
  stroke-width: 1.5px;
  fill: none;
  marker-end: url(#arrowhead);
}

/* Estilos para as setas */
.relationships-diagram .arrowhead {
  fill: var(--secondary-color);
}

/* Espaçamento entre tabelas */
.relationships-diagram .table-group {
  margin: var(--spacing-lg);
}

/* Schema Styles */
.schema-container {
  margin-top: var(--spacing-lg);
}

.schema-table {
  width: 100%;
  border-collapse: collapse;
}

.schema-table th,
.schema-table td {
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 1px solid #dee2e6;
  font-size: var(--font-size-sm);
}

.schema-table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.schema-property-name {
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

.schema-property-type {
  font-family: 'Courier New', monospace;
  color: var(--secondary-color);
  font-size: var(--font-size-sm);
}

.schema-property-required {
  color: var(--danger-color);
  margin-left: var(--spacing-xs);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .container-fluid {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
  }

  .endpoint-path {
    font-size: var(--font-size-md);
    word-break: break-all;
  }

  .sandbox-url {
    flex-direction: column;
  }

  .sandbox-url-server {
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    border-bottom: none;
  }

  .sandbox-url-path {
    border-left: 1px solid #ced4da;
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
  }

  .sandbox-param-row {
    flex-direction: column;
  }

  .sandbox-param-name {
    width: 100%;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    border-bottom: none;
  }

  .sandbox-param-value {
    width: 100%;
    border-left: 1px solid #ced4da;
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
  }
}

@media (max-width: 768px) {
  #nav-list.sticky-top {
    position: relative !important;
    height: auto;
    overflow-y: visible;
    width: 100%;
    top: 0 !important;
  }

  .server-description table {
    font-size: var(--font-size-xs);
  }

  .server-description code {
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs);
  }

  .auth-form {
    padding: var(--spacing-xs) !important;
  }

  #token-display {
    font-size: var(--font-size-xs);
  }

  .method-tabs {
    flex-wrap: wrap;
  }

  .method-tab {
    margin-bottom: var(--spacing-xs);
  }

  .parameters-table,
  .schema-table,
  .table-relationships-diagram {
    display: block;
    overflow-x: auto;
  }

  .table-relationships-container {
    padding: var(--spacing-xs);
  }

  .relationships-diagram {
    max-height: 300px;
  }
}

/* Animation Styles */
.fade-in {
  animation: fadeIn var(--transition-speed);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Section Styles */
section {
  scroll-margin-top: 15px;
  margin-bottom: var(--spacing-md);
}

/* Card Styles */
.card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: none;
  margin-bottom: var(--spacing-md);
}

.card-header {
  font-weight: bold;
  padding: var(--spacing-sm) var(--spacing-md);
}

.card-body {
  padding: var(--spacing-sm);
}

.card-header.bg-primary h2 {
  margin: 0;
  font-size: 1.3rem;
}

/* Utility Classes */
.text-monospace {
  font-family: 'Courier New', monospace;
}

.bg-light-hover:hover {
  background-color: #f8f9fa;
}

.cursor-pointer {
  cursor: pointer;
}

.overflow-auto {
  overflow: auto;
}

.word-break-all {
  word-break: break-all;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Add a style for table search field to select text on focus */
#table-search:focus {
  user-select: all;
}

/* Estilos para os inputs de parâmetros no endpoint */
#sandbox-endpoint input {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 2px 8px;
  margin: 0 2px;
  font-size: 0.9rem;
  background-color: #f8f9fa;
  transition: all 0.2s ease;
  display: inline-block;
  width: auto;
  min-width: 120px;
  max-width: 200px;
  height: 30px;
  vertical-align: middle;
}

#sandbox-endpoint input:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#sandbox-endpoint input::placeholder {
  color: #6c757d;
  font-style: italic;
}

#sandbox-endpoint span {
  vertical-align: middle;
}

/* Estilos para o formulário na Sandbox */
#form-pane, #json-pane {
  max-height: 80vh;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 0 0 4px 4px;
  margin-bottom: 15px;
}

#request-form-fields {
  max-width: 100%;
  overflow-x: auto;
}

#request-form-fields table {
  margin-top: 15px;
  width: 100%;
}

#request-form-fields th {
  background-color: #f8f9fa;
  font-weight: 600;
}

#request-form-fields td {
  vertical-align: middle;
  padding: 8px;
}

#request-form-fields thead th {
  background-color: #f8f9fa;
  font-weight: 600;
  text-align: center;
}

#request-form-fields tbody tr:hover {
  background-color: #f8f9fa;
}

#request-form-fields label {
  margin-bottom: 0;
  font-weight: 500;
}

#request-form-fields .form-text {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 2px;
}

#request-form-fields .text-danger {
  color: #dc3545;
  font-weight: bold;
  margin-left: 3px;
}

#request-form-fields .form-control,
#request-form-fields .form-select {
  font-size: 0.9rem;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#request-form-fields .form-control:focus,
#request-form-fields .form-select:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#request-form-fields code {
  font-size: 0.9rem;
  color: #212529;
  background-color: #f8f9fa;
  padding: 2px 4px;
  border-radius: 3px;
}

/* Estilo para o editor JSON */
.json-editor {
  height: 400px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  margin-top: 15px;
  width: 100%;
  max-width: 100%;
}

/* Estilos para a área de resposta */
#sandbox-response {
  margin-top: 20px;
  min-height: 150px;
  max-height: 300px;
  width: 100%;
  font-family: monospace;
  font-size: 0.9rem;
  background-color: #f8f9fa;
  resize: vertical;
}

/* Estilos para a seção de script */
#generated-script {
  min-height: 200px;
  max-height: 400px;
  width: 100%;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  white-space: pre-wrap;
  overflow-x: auto;
  overflow-y: auto;
  margin: 0;
}

/* Ajustes para melhor legibilidade do código */
#generated-script.language-javascript,
#generated-script.language-python,
#generated-script.language-ruby,
#generated-script.language-php,
#generated-script.language-csharp,
#generated-script.language-go,
#generated-script.language-bash {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
}

/* Estilo para o botão de copiar */
#copy-script-btn {
  margin-top: 10px;
}

#copy-script-btn.copied {
  background-color: #28a745;
  border-color: #28a745;
}

.card-header h5 {
  font-size: 1.1rem;
  margin-bottom: 0;
}

#copy-script-btn {
  transition: all 0.2s ease;
}

#copy-script-btn.copied {
  background-color: #28a745;
  border-color: #28a745;
  color: white;
}

.json-editor {
  height: 300px;
}

.form-field {
  width: 100%;
}

/* Language Switcher Styles */
.language-menu .dropdown-item {
  padding: 8px 15px;
  transition: all 0.2s ease;
}

.language-menu .dropdown-item:hover {
  background-color: #f8f9fa;
}

.language-menu .dropdown-item.active {
  background-color: #e9f0ff;
  color: var(--primary-color);
  font-weight: 500;
}

.language-menu .dropdown-item i {
  margin-left: 8px;
  color: var(--success-color);
}

/* Language Change Notification */
.language-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0;
  z-index: 9999;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 300px;
}

.language-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.language-notification-content {
  display: flex;
  align-items: center;
  padding: 12px 16px;
}

.language-notification.error .language-notification-content {
  border-left: 4px solid var(--danger-color);
}

.language-notification:not(.error) .language-notification-content {
  border-left: 4px solid var(--success-color);
}

.language-notification i {
  font-size: 18px;
  margin-right: 10px;
}

.language-notification span {
  font-size: 14px;
  color: #333;
}

/* Spinner for language button */
#languageDropdown:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#languageDropdown .spinner-border {
  width: 1rem;
  height: 1rem;
}

/* Estilos para tabelas no explorador de API */
#api-details table {
    margin-bottom: 1.5rem;
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

#api-details thead {
    background-color: #f8f9fa;
}

#api-details th {
    border-top: none;
    padding: 8px;
}

#api-details td {
    padding: 8px;
    vertical-align: middle;
}

/* Ajuste para scrollbar mais elegante */
#api-details .table-container::-webkit-scrollbar {
    width: 8px;
}

#api-details .table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#api-details .table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#api-details .table-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.collapsible-section {
    margin-bottom: 1rem;
}

.collapsible-header {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapsible-content {
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 4px 4px;
    overflow-y: auto;
    max-height: 70vh;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.collapsed {
    display: none;
}

.parameters-table-container,
.request-body-container,
.response-container {
    padding: 1rem;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-icon.collapsed {
    transform: rotate(-90deg);
}

/* Ajuste para as setas das sections principais */
.card-header .bi-chevron-up {
    transition: transform 0.3s ease;
}

.card-header .collapsed .bi-chevron-up,
.card-header button[aria-expanded="false"] .bi-chevron-up {
    transform: rotate(180deg);
}

/* Mantendo os estilos existentes do collapsible */
.collapsible-header .bi-chevron-down {
    transition: transform 0.3s ease;
}

.collapsible-header.collapsed .bi-chevron-down {
    transform: rotate(-90deg);
}

/* Estilo para os ícones do botão collapse */
[data-bs-toggle="collapse"] {
    position: relative;
}

[data-bs-toggle="collapse"] i {
    transition: opacity 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

[data-bs-toggle="collapse"] .show-expanded {
    opacity: 1;
}

[data-bs-toggle="collapse"] .show-collapsed {
    opacity: 0;
}

[data-bs-toggle="collapse"].collapsed .show-expanded {
    opacity: 0;
}

[data-bs-toggle="collapse"].collapsed .show-collapsed {
    opacity: 1;
}

/* Ajuste do tamanho do botão para acomodar os ícones */
.card-header .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    position: relative;
}

#request-form-fields .table {
    margin-bottom: 0;
}

#request-form-fields .table td {
    padding: 0.5rem;
    vertical-align: middle;
}

#request-form-fields .table input {
    min-width: 200px;
}

#request-form-fields .btn-outline-secondary {
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

#request-form-fields .text-danger {
    cursor: help;
    margin-left: 2px;
}

#request-form-fields .table th:nth-child(3) {
    width: 40px;
}

#request-form-fields .table input[type=checkbox] {
  min-width: 2rem;
  min-height: 2rem;
}

/* Estilos para o container do código gerado */
#generated-script {
    position: relative;
    margin: 1em 0;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

/* Estilos para os elementos pre e code */
#generated-script pre {
    margin: 0;
    padding: 15px;
    max-height: 400px;
    overflow: auto;
}

#generated-script code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Estilos específicos para o Prism */
.token.comment {
    color: #6a737d;
}

.token.string {
    color: #032f62;
}

.token.number {
    color: #005cc5;
}

.token.keyword {
    color: #d73a49;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #666;
}

.loading-spinner i {
    margin-right: 10px;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#generated-script pre {
    min-height: 100px;
    margin: 0;
}

#generated-script .loading {
    background: none;
    border: 1px dashed #ddd;
}

/* Estilos para o JSON da resposta no explorador de API */
.response-json-container {
    margin-top: 1rem;
}

.response-json-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.response-json {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
    margin: 0;
    max-height: 400px;
    overflow: auto;
}

.response-json code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Estilos para o select de códigos de resposta */
.form-select {
    max-width: 400px;
    margin-bottom: 1rem;
}

/* Cores para syntax highlighting */
.language-json .token.property {
    color: #d73a49;
}

.language-json .token.string {
    color: #032f62;
}

.language-json .token.number {
    color: #005cc5;
}

.language-json .token.boolean {
    color: #005cc5;
}

.language-json .token.null {
    color: #005cc5;
}

/* Form JSON Tabs Styles */
#form-json-tabs {
    display: flex;
    margin-bottom: 1rem;
}

#form-json-tabs.hidden,
#request-tab-content.hidden {
    display: none !important;
}

/* Garantir que as tabs ocupem toda a largura quando visíveis */
#form-json-tabs .nav-item {
    flex: 1;
}

#form-json-tabs .nav-link {
    width: 100%;
    text-align: center;
}

/* Estilo para o conteúdo das tabs */
#request-tab-content {
    border: 1px solid #dee2e6;
    border-top: none;
    padding: 1rem;
    background-color: #fff;
}

/* Ajuste para quando as tabs estiverem ocultas */
#sandbox-form:not(:has(#form-json-tabs[style*="display: flex"])) {
    margin-top: 1rem;
}

/* Sandbox Parameters Styles */
.path-variable {
    margin: 0 0.25rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-family: var(--font-monospace);
}

#query-params-container {
    margin-top: 1rem;
}

#query-params-form .input-group-sm {
    width: 100%;
}

#query-params-form .form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

#query-params-form .input-group .btn-outline-secondary {
    border-color: #ced4da;
}

#query-params-form .input-group .btn-outline-secondary:hover {
    background-color: #e9ecef;
}

.sandbox-endpoint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-monospace);
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.sandbox-endpoint code {
    color: #1a1a1a;
}

/* Sandbox Endpoint Styles */
#sandbox-endpoint {
    color: #6c757d;
    font-family: var(--font-monospace);
}

#sandbox-path {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.path-variable {
    margin: 0 0.25rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-family: var(--font-monospace);
    min-width: 80px;
    max-width: 120px;
}

.path-variable:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

#query-params-form .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #495057;
}

#query-params-form .input-group {
    margin-bottom: 0.5rem;
}

#query-params-form .input-group-sm > .form-control,
#query-params-form .input-group-sm > .form-select {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

#query-params-form .btn-outline-secondary {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

#query-params-form .form-select {
    padding-right: 2rem;
}

#query-params-form input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.tooltip {
    font-size: 0.875rem;
}

#query-params-container .card-header {
    padding: 0.5rem 1rem;
}

#query-params-container .card-header h5 {
    font-size: 0.9rem;
    margin: 0;
}

#query-params-container .card-body {
    padding: 0.5rem;
}

#query-params-form .input-group {
    margin-bottom: 0.25rem;
}

#query-params-form .input-group-text {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    background-color: #f8f9fa;
    min-width: 80px;
}

#query-params-form .form-control,
#query-params-form .form-select {
    font-size: 0.875rem;
}

#query-params-form .btn-outline-secondary {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

#query-params-form .text-danger {
    font-weight: bold;
}

#sandbox-form .form-control {
  padding: 0;
}