/* Styled after the Sablier documentation at sablierapp.dev: neutral dark
   background, outlined cards, pill buttons and an orange accent. */
:root {
    --accent: #ff9f33;
    --accent-soft: rgb(255 159 51 / 0.14);

    --bg: #111111;
    --surface: #161616;
    --border: #262626;
    --border-strong: #404040;
    --text: #f3f4f6;
    --muted: #a3a3a3;

    --radius: 16px;
    --gap: 10px;
    color-scheme: dark;
}

* {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    box-sizing: border-box;
    color: inherit;
    margin: 0;
    outline: none;
    padding: 0;
}
body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    font-size: 14px;
    min-width: 600px;
}
a {
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}
a:hover {
    color: var(--text);
}
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

#header {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 64px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
}
.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}
.brand img {
    height: 24px;
}
.brand-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.brand-tag {
    font-size: 15px;
    font-weight: 500;
}
.brand-tag::before {
    content: "/";
    margin-right: 12px;
    color: var(--border-strong);
}
#header nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    font-size: 14px;
}
#header nav .icon {
    display: flex;
}
/* Styled like the search box of the documentation */
.nav-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 0;
    border-radius: 8px;
    background: #1f1f1f;
    color: var(--muted);
    font-size: 13px;
}
.nav-button:hover {
    background: #262626;
    color: var(--text);
}
.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}
#main {
    height: calc(100vh - 64px);
    min-height: 500px;
    padding: var(--gap);
}
#layout {
    height: 100%;
}

/* Buttons, like the search box of the documentation */
button {
    padding: 3px 10px;
    border: 0;
    border-radius: 6px;
    background: #1f1f1f;
    font: inherit;
    font-size: 12px;
    line-height: 1.5;
    color: #d4d4d4;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s, background-color .15s;
}
button:hover {
    background: #262626;
    color: var(--text);
}
button:active,
button[aria-pressed="true"] {
    background: var(--accent-soft);
    color: var(--accent);
}

.panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
}
.panel-body {
    flex: 1;
    min-height: 0;
}
.toolbar {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 40px;
    padding: 6px 16px;
    border-bottom: 1px solid var(--border);
}
.toolbar-label {
    margin-right: 4px;
    color: #737373;
    font-size: 12px;
    white-space: nowrap;
}
/* Let the theme buttons wrap along with the rest of the toolbar */
#theme-buttons {
    display: contents;
}
.toolbar-help {
    display: flex;
    margin-left: auto;
    padding-left: 8px;
    color: #737373;
}

.preview {
    display: flex;
    background: white;
}
.preview iframe {
    flex-grow: 1;
}

/* Editors: blend Ace into the panels */
#layout .ace_editor {
    background-color: var(--surface);
    font-size: 13px;
}
#layout .ace_gutter {
    background: var(--surface);
    color: #525252;
}
#layout .ace_gutter-active-line,
#layout .ace_marker-layer .ace_active-line {
    background: #1f1f1f;
}
#layout .ace_marker-layer .ace_selection {
    background: rgb(255 159 51 / 0.25);
}

/* Layout: dockview's dark theme as outlined cards */
#layout .dockview-theme-dark {
    --dv-group-view-background-color: var(--surface);
    --dv-tabs-and-actions-container-background-color: var(--surface);
    --dv-tabs-and-actions-container-height: 40px;
    --dv-tabs-and-actions-container-font-size: 13px;
    --dv-activegroup-visiblepanel-tab-background-color: var(--surface);
    --dv-activegroup-hiddenpanel-tab-background-color: var(--surface);
    --dv-inactivegroup-visiblepanel-tab-background-color: var(--surface);
    --dv-inactivegroup-hiddenpanel-tab-background-color: var(--surface);
    --dv-activegroup-visiblepanel-tab-color: var(--text);
    --dv-activegroup-hiddenpanel-tab-color: var(--muted);
    --dv-inactivegroup-visiblepanel-tab-color: var(--text);
    --dv-inactivegroup-hiddenpanel-tab-color: var(--muted);
    --dv-tab-divider-color: transparent;
    --dv-separator-border: transparent;
    --dv-paneview-header-border-color: var(--border);
    --dv-paneview-active-outline-color: var(--accent);
    --dv-active-sash-color: var(--accent);
    --dv-drag-over-background-color: var(--accent-soft);
    --dv-drag-over-border-color: var(--accent);
    --dv-edge-dock-indicator-color: var(--accent);
    --dv-border-radius: var(--radius);
    background: transparent;
}
#layout .dv-groupview {
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
#layout .dv-groupview:hover {
    border-color: var(--border-strong);
}
#layout .dv-tabs-and-actions-container {
    padding: 0 6px;
}
#layout .dv-tab {
    font-weight: 600;
}
/* The visible panel of each group is underlined in orange */
#layout .dv-tab.dv-active-tab {
    box-shadow: inset 0 -2px 0 var(--accent);
}
/* Panels cannot be reopened once closed, so hide the tab close buttons */
#layout .dv-default-tab-action {
    display: none;
}
