/* --- General Layout & Typography --- */
body {
  font-family: 'Roboto', 'Montserrat', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #23272f;
  background: #f7f8fa;
  margin: 0;
  padding: 0;
}

#redoc {
  background: #fff;
  box-shadow: 0 2px 16px rgba(30,40,90,0.07);
  border-radius: 12px;
}

/* --- Logo Header --- */
.logo-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 32px 12px 32px;
  background: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 8px rgba(30,40,90,0.04);
  min-height: 60px;
}
.logo-header img {
  height: 40px;
  max-width: 180px;
  object-fit: contain;
  background: transparent;
}

/* --- Sidebar --- */
.redoc-sidebar, .menu-content, .api-menu {
  min-width: 240px;
  border-radius: 12px 0 0 12px;
}

.menu-content img {
  box-shadow: none;
}

.redoc-sidebar .active, .menu-content .active {
  background: #e9ecef !important;
  color: #1f2587 !important;
  border-left: 4px solid #5a61dc;
}
.redoc-sidebar a, .menu-content a {
  color: #fff !important;
  text-decoration: none;
  transition: color 0.2s;
}
.redoc-sidebar a:hover, .menu-content a:hover {
  color: #f7df1e !important;
}

/* --- Main Content --- */
.redoc-container, .api-content {
  border-radius: 0 12px 12px 0;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 700;
  color: #1f2587;
}
h1 { font-size: 2.2em; }

[id^="operation"] {
    padding-bottom: 2.2em !important;
    padding-top: 2.2em !important;
}

:not([id^="operation"]) > div > h2 { 
    font-size: 1.6em; 
    border-bottom: 2px solid #e1e5e9; 
    padding-bottom: 0.2em !important;
    margin-top: 2.2em !important;
    margin-bottom: 0.7em !important;
}
h3 { font-size: 1.25em; }
h4, h5, h6 { font-size: 1.1em; }

p, ul, ol, dl {
  margin-top: 0.5em;
  margin-bottom: 1.2em;
}

/* --- Code Blocks --- */

pre, code {
  font-family: 'Fira Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 1em;
}
pre {
  background: #23272f;
  color: #f7f7f7;
  border-radius: 8px;
  padding: 1.1em 1.3em;
  margin: 1.5em 0;
  overflow-x: auto;
  position: relative;
}
code {
  border-radius: 4px;
  padding: 0.2em 0.4em;
  font-size: 0.97em;
}

/* Copy button for code blocks */
pre {
  position: relative;
}
pre .copy-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: #5a61dc;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 0.9em;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
pre .copy-btn:hover {
  opacity: 1;
}

/* --- Tables --- */
table:not([class^="sc-"]) {
  display: table !important;
  width: auto !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 1.5em 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden !important;
  box-shadow: 0 1px 4px rgba(30,40,90,0.04);
}
table:not([class^="sc-"]) > thead > tr > th, table:not([class^="sc-"]) > tbody > tr > td {
  padding: 0.7em 1em;
  border-bottom: 1px solid #e1e5e9;
  border-top: 0;
  border-right: 0;
}
table:not([class^="sc-"]) > thead > tr:first-child > th {
  border-top: 1px solid #e1e5e9;
}
table:not([class^="sc-"]) > thead > tr > th:first-child {
  border-top-left-radius: 8px;
}
table:not([class^="sc-"]) > thead > tr > th:last-child {
  border-top-right-radius: 8px;
  border-right: 1px solid #e1e5e9;
}
table:not([class^="sc-"]) > tbody > tr:last-child > td {
  border-bottom: 1px solid #e1e5e9;
}
table:not([class^="sc-"]) > tbody > tr > td:last-child {
  border-right: 1px solid #e1e5e9;
}
table:not([class^="sc-"]) > tbody > tr:last-child > td {
    border-bottom: 1px solid #e1e5e9;
}
table:not([class^="sc-"]) > tbody > tr:last-child > td:first-child {
    border-bottom-left-radius: 8px;
}
table:not([class^="sc-"]) > tbody > tr:last-child > td:last-child {
    border-bottom-right-radius: 8px;
    border-right: 1px solid #e1e5e9;
}


th {
  background: #f8f9fa;
  color: #1f2587;
  font-weight: 600;
}
table:not([class^="sc-"]) > tbody > tr:nth-child(even) {
  background: #f3f4f7;
}

/* --- Callouts & Notes --- */
.callout, .note, .tip, .warning {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-left: 6px solid #5a61dc;
  background: #f3f4f7;
  padding: 1.1em 1.3em;
  margin: 1.5em 0;
  border-radius: 10px;
  font-size: 1em;
  position: relative;
  box-shadow: none;
  gap: 0.5em;
  padding-left: 40px;
}
.callout.info { border-color: #1f2587; }
.callout.warning { border-color: #f7df1e; background: #fffbe6; }
.callout.danger { border-color: #e74c3c; background: #fff0f0; }
.callout::before {
  content: 'ℹ️';
  font-size: 1.7em;
  margin-right: 0.7em;
  margin-top: 0.05em;
  flex-shrink: 0;
  line-height: 1;
  display: inline-block;
  position: absolute;
  left: 10px;
}
.callout.warning::before { content: '⚠️'; }
.callout.danger::before { content: '❗'; }

/* --- Images --- */
img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(30,40,90,0.07);
  margin: 1em 0;
}

/* --- Buttons (for markdown/html) --- */
button.primary, .primary {
  background: #5a61dc;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 22px;
  font-size: 1em;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  margin: 0.5em 0;
  box-shadow: 0 2px 8px rgba(30,40,90,0.07);
}
button.primary:hover, .primary:hover {
  background: #313ad4;
}

/* --- Miscellaneous --- */
hr {
  border: none;
  border-top: 2px solid #e1e5e9;
  margin: 2em 0;
}

/* --- Responsive --- */
@media (max-width: 700px) {
  .logo-header {
    padding: 12px 8px 8px 8px;
  }
  .redoc-container, .api-content {
    padding: 10px 2vw 32px 2vw !important;
  }
  table, th, td {
    font-size: 0.95em;
    padding: 0.5em 0.5em;
  }
  h1 { font-size: 1.4em; }
  h2 { font-size: 1.1em; }
  .callout, .note, .tip, .warning {
    font-size: 0.97em;
    padding: 0.8em 0.7em;
    border-radius: 7px;
    gap: 0.3em;
  }
  .callout::before {
    font-size: 1.3em;
    margin-right: 0.5em;
  }
} 

.code-tabs {
    margin: 1rem 0;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
  }
  
  .code-tabs-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
  }
  
  .code-tab-btn {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    border-right: 1px solid #e1e5e9;
    font-family: inherit;
    font-size: 0.875rem;
    color: #6c757d;
    transition: all 0.2s;
  }
  
  .code-tab-btn:last-child {
    border-right: none;
  }
  
  .code-tab-btn:hover {
    background: #e9ecef;
  }
  
  .code-tab-btn.active {
    background: white;
    color: #1f2587;
    font-weight: 600;
    border-bottom: 2px solid #1f2587;
    margin-bottom: -1px;
  }
  
  .code-tab-content {
    display: none;
  }
  
  .code-tab-content.active {
    display: block;
  }
  
  .code-tab-content pre {
    margin: 0;
    border-radius: 0;
  }
  
  .code-tab-btn .lang-badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
  }
  
  .code-tab-btn .lang-badge.nodejs { background: #68a063; }
  .code-tab-btn .lang-badge.php { background: #777bb4; }
  .code-tab-btn .lang-badge.csharp { background: #239120; }
  .code-tab-btn .lang-badge.python { background: #3776ab; }
  .code-tab-btn .lang-badge.javascript { background: #f7df1e; color: #000; }
  .code-tab-btn .lang-badge.curl { background: #073551; }
  .code-tab-btn .lang-badge.bash { background: #4eaa25; }
  .code-tab-btn .lang-badge.json { background: #000000; }