/* WebKit-based browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a; /* фон трека, как в тёмной теме */
}

::-webkit-scrollbar-thumb {
    background-color: #3390ff; /* синий цвет ползунка */
    border-radius: 10px;
    border: 2px solid #1a1a1a; /* пространство вокруг для эффекта врезанности */
}

::-webkit-scrollbar-thumb:hover {
    background-color: #5aaeff;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #3390ff #1a1a1a;
}

body { font-family: monospace; background: #1e1e2f; color: #eee; margin: 0; padding: 0; display: flex; height: 100vh; }
.left-panel { flex: 1; display: flex; flex-direction: column; background: #2b2f3a; padding: 20px; overflow-y: auto; position: relative; }
.right-panel { width: 500px; background: #f5f5f5; color: #000; padding: 10px; overflow-y: scroll; display: flex; flex-direction: column; }
.top-bar { display: flex; align-items: center; gap: 10px; background: #191c27; padding: 10px; border-radius: 6px; margin-bottom: 15px; }
.top-bar input, .top-bar button { padding: 5px 10px; font-size: 14px; border-radius: 4px; border: none; background: #444; color: #fff; }
.top-bar button:hover { background: #61dafb; color: #000; cursor: pointer; }
.block-group { background: #333; padding: 15px; margin-bottom: 15px; border-radius: 6px; border-left: 5px solid #61dafb; }
.block-w-group { background: #e1e1e1; color: #000; padding: 10px; margin-bottom: 15px; border-radius: 6px; }
.narration-text { font-weight: bold; margin-bottom: 8px; color: #eee; }
.block-w-group .narration-text { color: #555; font-weight: normal; }
.option { background: #3a3f4b; color: #79d6ff; padding: 10px 15px; margin: 4px 0; border-radius: 3px; cursor: pointer; transition: 0.2s ease; }
.option:hover { background: #5c5cff; color: #fff; }
.option-label { color: #aaa; font-size: 14px; margin: 20px 0 5px; border-top: 1px dashed #444; padding-top: 10px; }
.log-line { font-size: 12px; margin-bottom: 4px; }
#log { font-family: monospace; height: 200px; overflow-y: auto; }
#tree { flex: 1; padding: 10px; overflow-y: auto; font-size: 13px; font-family: monospace; }
#loader {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 10;
}
.tree-block {
    margin: 10px 0;
    padding: 10px;
    background: #fff;
    border-left: 4px solid #999;
}
.tree-block .meta { font-weight: bold; font-size: 12px; margin-bottom: 5px; color: #444; }
.tree-group { margin: 5px 0 8px 10px; }
.tree-section-label { font-weight: bold; text-transform: uppercase; font-size: 11px; margin-top: 10px; color: #444; }
.tree-step { margin-left: 10px; font-size: 13px; margin-bottom: 3px; }
.tree-indent { padding-left: 20px; font-weight: bold; }
.tree-divider { margin: 10px 0; border-top: 1px dashed #ccc; }
.toggle-btn { margin: 5px 10px; padding: 3px 8px; font-size: 14px; cursor: pointer; color: #0f97f1; background: none; border: none; }
.tree-output-wrapper { display: none; }
.tree-output-wrapper.open { display: block; }
.option.disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    pointer-events: none;
}
.block-group.disabled {
    opacity: 0.6;
}
#tree-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#tree {
    flex: 1;
    overflow-y: auto;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

#tree-logs {
    max-height: 200px;
    overflow-y: auto;
    background: #f0f0f0;
    padding: 10px;
    font-size: 0.9em;
    color: #333;
}

#tree-logs-content > div {
    margin-bottom: 4px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-height: 80%;
    overflow-y: auto;
    font-family: monospace;
    white-space: pre-wrap;
    color: #1a1a1a;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    cursor: pointer;
}

.tree-log-entry {
    border-bottom: 1px solid #ccc;
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tree-log-title {
    font-family: monospace;
}

.tree-log-time {
    color: gray;
    font-size: 0.8em;
    margin-left: 10px;
}

.view-json {
    padding: 4px 10px;
    font-size: 0.8em;
    cursor: pointer;
}

/* JSON styles in modal */
#jsonContent {
    font-family: monospace;
    font-size: 14px;
    white-space: pre-wrap;
    padding-left: 10px;
    padding-right: 10px;
}

#jsonContent p {
    margin: 0;
  padding: 0;
  line-height: 2;
}

.json-key {
    color: #d14;
    font-weight: bold;
}

.json-string {
    color: #1a1aa6;
}

.json-number {
    color: #0b7500;
}

.json-boolean {
    color: #aa0d91;
}

.json-null {
    color: gray;
}

.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    margin-left: 6px;
    vertical-align: middle;
}

.badge-request {
    background-color: #007bff;
    color: white;
}

.badge-response {
    background-color: #28a745;
    color: white;
}

.notion-view h1, .notion-view h2, .notion-view h3, .notion-view h4 {
  font-weight: 600;
  margin-top: 5px;
  margin-bottom: 8px;
  border-left: 4px solid #ddd;
  padding-left: 10px;
}

.notion-view pre {
  background: #f6f8fa;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
}

.notion-view code {
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.notion-view ul {
  padding-left: 1.2em;
}

.notion-view ol, .notion-view ul {
    line-height: 0.8em;
    margin-top: 0px;
}

.notion-view blockquote {
  margin: 5px 0px 5px 0px;
  padding: 0.5em 1em;
  background: #f2f3f5;
  border-left: 4px solid #ccc;
  border-radius: 4px;
}

.notion-view .comment {
  color: #f54b4b;
  font-style: italic;
  font-size: 0.9em;
  margin: 5px 0px 5px 0px;
  padding-left: 12px;
  border-left: 2px solid #f54b4b;
}

.input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    width: calc(100% - 520px);
    background-color: #767677;
    border-top: 1px solid #333;
    padding: 10px;
    display: flex;
    gap: 8px;
    box-sizing: border-box;
}

.input-area input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    color: #000;
    background-color: #fff;
    border: 1px solid #6c6c7c;
    outline: none;
}

.input-area button {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    color: #333;
    background-color: #61dafb;
    border: none;
}

.input-area button:hover {
    background-color: #4ab6d2;
}

.mask-option {
    cursor: pointer;
    padding: 8px 12px;
    background-color: #222;
    color: #79d6ff;
    border: 1px solid #333;
    margin: 4px 0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.mask-option:hover {
    background-color: #333;
}

.mask-option.selected {
    background-color: #007acc;
    color: #fff;
    border-color: #007acc;
}

#options_masks .inner {
    display: flex;
}
