/* API Portal Custom Styles */

/* Global text colors for light/dark mode */
body,
.code-block,
pre,
code {
  color: #000000;
}

.dark body,
.dark .code-block,
.dark pre,
.dark code {
  color: #ffffff;
}

/* Custom scrollbar - Dark mode */
.dark .custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}



.dark .custom-scrollbar::-webkit-scrollbar-track {
  background: #1f2937;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 4px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Custom scrollbar - Light mode */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f3f4f6;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* JSON Syntax Highlighting - Dark mode */
.dark .json-key {
  color: #93c5fd;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.dark .json-string {
  color: #6ee7b7;
  word-wrap: break-word;
}

.dark .json-number {
  color: #fcd34d;
  font-weight: 500;
}

.dark .json-boolean {
  color: #f9a8d4;
  font-weight: 500;
}

.dark .json-null {
  color: #d1d5db;
  font-style: italic;
  opacity: 0.7;
}

.dark .json-punctuation,
.dark pre,
.dark code {
  color: #ffffff;
}

/* JSON Syntax Highlighting - Light mode */
.json-key {
  color: #000000;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.json-string {
  color: #000000;
  word-wrap: break-word;
}

.json-number {
  color: #000000;
  font-weight: 500;
}

.json-boolean {
  color: #000000;
  font-weight: 500;
}

.json-null {
  color: #000000;
  font-style: italic;
  opacity: 0.7;
}

.json-punctuation,
pre,
code {
  color: #000000;
}

/* Status code badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.status-2xx {
  background-color: #10b981;
  color: white;
}

.status-3xx {
  background-color: #3b82f6;
  color: white;
}

.status-4xx {
  background-color: #f59e0b;
  color: white;
}

.status-5xx {
  background-color: #ef4444;
  color: white;
}

/* Method badges */
.method-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.method-get {
  background-color: #10b981;
  color: white;
}

.method-post {
  background-color: #3b82f6;
  color: white;
}

.method-put {
  background-color: #f59e0b;
  color: white;
}

.method-patch {
  background-color: #8b5cf6;
  color: white;
}

.method-delete {
  background-color: #ef4444;
  color: white;
}

/* Code block - Dark mode */
.dark .code-block {
  background-color: #1f2937;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #ffffff;
  max-height: 600px;
  overflow-y: auto;
}

/* Code block - Light mode */
.code-block {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #000000;
  max-height: 600px;
  overflow-y: auto;
}
}

/* Spinner animation */
.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Collapsible sections */
.collapsible-header {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.dark .collapsible-header:hover {
  background-color: #374151;
}

.collapsible-header:hover {
  background-color: #f3f4f6;
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.collapsible-content.open {
  max-height: 2000px;
  transition: max-height 0.5s ease-in;
}

/* Sidebar navigation */
.nav-item {
  transition: all 0.2s ease;
}

.dark .nav-item:hover {
  background-color: #374151;
  transform: translateX(4px);
}

.nav-item:hover {
  background-color: #e5e7eb;
  transform: translateX(4px);
}

.dark .nav-item.active {
  background-color: #3b82f6;
  border-left: 4px solid #60a5fa;
  color: white;
}

.nav-item.active {
  background-color: #3b82f6;
  border-left: 4px solid #60a5fa;
  color: white;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  min-width: 300px;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease-out;
  z-index: 1000;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-success {
  background-color: #10b981;
  color: white;
}

.toast-error {
  background-color: #ef4444;
  color: white;
}

.toast-warning {
  background-color: #f59e0b;
  color: white;
}

.toast-info {
  background-color: #3b82f6;
  color: white;
}

/* Form inputs - Light mode */
.dark-input {
  background-color: #ffffff !important;
  border-color: #d1d5db !important;
  color: #000000 !important;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  -webkit-text-fill-color: #000000 !important;
}

.dark-input:focus {
  border-color: #3b82f6 !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.dark-input::placeholder {
  color: #9ca3af !important;
  opacity: 1;
  -webkit-text-fill-color: #9ca3af !important;
}

/* Form inputs - Dark mode */
.dark .dark-input {
  background-color: #1f2937 !important;
  border-color: #4b5563 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.dark .dark-input:focus {
  border-color: #3b82f6 !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.dark .dark-input::placeholder {
  color: #9ca3af !important;
  opacity: 1;
  -webkit-text-fill-color: #9ca3af !important;
}

/* Autofill styling - Light mode */
.dark-input:-webkit-autofill,
.dark-input:-webkit-autofill:hover,
.dark-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #000000 !important;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Autofill styling - Dark mode */
.dark .dark-input:-webkit-autofill,
.dark .dark-input:-webkit-autofill:hover,
.dark .dark-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #1f2937 inset !important;
  box-shadow: 0 0 0 1000px #1f2937 inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Select option styling - Light mode */
.dark-input option {
  background-color: #ffffff !important;
  color: #000000 !important;
  padding: 8px;
}

/* Select option styling - Dark mode */
.dark .dark-input option {
  background-color: #1f2937 !important;
  color: #ffffff !important;
  padding: 8px;
}

/* Additional select element styling for better visibility */
select.dark-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
}

.dark select.dark-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
}

/* Latency indicator */
.latency-fast {
  color: #10b981;
}

.latency-medium {
  color: #f59e0b;
}

.latency-slow {
  color: #ef4444;
}

/* Table Row Colors for Better Readability */
.dark tbody tr {
  border-bottom-color: #374151;
}

tbody tr {
  border-bottom-color: #e5e7eb;
}

.dark tbody tr:hover {
  background-color: #1f2937;
}

tbody tr:hover {
  background-color: #f9fafb;
}

/* Enhanced text contrast for tables */
.dark table td {
  color: #e5e7eb;
}

table td {
  color: #1f2937;
}

/* Tab Interface Styles */
.request-tab {
  position: relative;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.request-tab:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

.dark .request-tab:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

.tab-content {
  display: none;
  animation: fadeIn 0.2s ease-in;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Parameter Cards */
.param-card {
  transition: all 0.2s;
}

.param-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.dark .param-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Collapsible Headers Content */
.headers-collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.headers-collapsible-content.active {
  max-height: 400px;
  transition: max-height 0.3s ease-in;
}

/* Response Section Enhancements */
.response-section {
  transition: all 0.2s;
}

.response-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark .response-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Parameter Input Fields - Enhanced Visibility */
.param-input {
  background-color: #ffffff !important;
  border: 2px solid #d1d5db !important;
  color: #111827 !important;
  transition: all 0.2s;
  -webkit-text-fill-color: #111827 !important;
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.param-input:hover {
  border-color: #9ca3af !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.param-input:focus {
  border-color: #3b82f6 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 2px 6px rgba(0, 0, 0, 0.1);
  background-color: #f9fafb !important;
}

.param-input::placeholder {
  color: #6b7280 !important;
  opacity: 1;
  -webkit-text-fill-color: #6b7280 !important;
  font-weight: 400;
}

/* Dark mode parameter inputs */
.dark .param-input {
  background-color: #111827 !important;
  border-color: #4b5563 !important;
  color: #f9fafb !important;
  -webkit-text-fill-color: #f9fafb !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dark .param-input:hover {
  border-color: #6b7280 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.dark .param-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3), 0 2px 6px rgba(0, 0, 0, 0.4);
  background-color: #1f2937 !important;
}

.dark .param-input::placeholder {
  color: #9ca3af !important;
  -webkit-text-fill-color: #9ca3af !important;
}

/* Parameter input autofill - Light mode */
.param-input:-webkit-autofill,
.param-input:-webkit-autofill:hover,
.param-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #111827 !important;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset, 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 0 0 1000px #ffffff inset, 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Parameter input autofill - Dark mode */
.dark .param-input:-webkit-autofill,
.dark .param-input:-webkit-autofill:hover,
.dark .param-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f9fafb !important;
  -webkit-box-shadow: 0 0 0 1000px #111827 inset, 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  box-shadow: 0 0 0 1000px #111827 inset, 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* JSON Validation States */
#request-body.json-valid {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.dark #request-body.json-valid {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3), 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

#request-body.json-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.dark #request-body.json-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3), 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

#request-body.json-neutral {
  border-color: #d1d5db !important;
}

.dark #request-body.json-neutral {
  border-color: #4b5563 !important;
}

/* Validation message animation */
#json-validation-message {
  transition: all 0.3s ease;
}

/* Form data input styling */
.form-data-input[type=\"file\"] {
  transition: all 0.2s;
  cursor: pointer;
}

.form-data-input[type=\"file\"]:hover {
  border-color: #9ca3af !important;
}

.dark .form-data-input[type=\"file\"] {
  background-color: #1f2937 !important;
  color: #f9fafb !important;
}

.dark .form-data-input[type=\"file\"]:hover {
  border-color: #6b7280 !important;
}

/* Code block better contrast */
.dark .code-block {
  color: #ffffff;
}

.code-block {
  color: #000000;
}

/* Response Schema Tab Styles */
.response-schema-tab {
  position: relative;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.response-schema-tab:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

.dark .response-schema-tab:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

.response-schema-content {
  display: none;
  animation: fadeIn 0.2s ease-in;
}

.response-schema-content.active {
  display: block;
}

/* Status Badge Variants for Response Codes */
.status-success {
  background-color: #10b981;
  color: white;
}

.status-redirect {
  background-color: #3b82f6;
  color: white;
}

.status-client-error {
  background-color: #f59e0b;
  color: white;
}

.status-server-error {
  background-color: #ef4444;
  color: white;
}

.status-default {
  background-color: #6b7280;
  color: white;
}

/* Syntax highlighting enhancements for response schemas */
.dark .code-block .json-string {
  color: #6ee7b7;
}

.dark .code-block .json-number {
  color: #fcd34d;
}

.dark .code-block .json-boolean {
  color: #f9a8d4;
}

.dark .code-block .json-null {
  color: #d1d5db;
}

.dark .code-block .json-punctuation {
  color: #9ca3af;
}

.code-block .json-string {
  color: #059669;
}

.code-block .json-number {
  color: #d97706;
}

.code-block .json-boolean {
  color: #db2777;
}

.code-block .json-null {
  color: #6b7280;
}

.code-block .json-punctuation {
  color: #4b5563;
}

