/* AMADA shell UI (articles use articles/darkmode.css) */

body.amada-shell {
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.amada-layout {
    flex: 1;
    display: flex;
    min-height: 0;
}

.amada-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    min-height: 0;
}

.amada-sidebar--left {
    border-right: 1px solid #282828;
}

.amada-sidebar--right {
    border-left: 1px solid #282828;
}

.amada-sidebar-head {
    flex-shrink: 0;
    padding: 14px 12px 10px;
    border-bottom: 1px solid #222;
}

.amada-sidebar-head h1 {
    font-size: 15px;
    margin: 0 0 4px;
    font-weight: 500;
    letter-spacing: 0;
}

.amada-sidebar-head .meta {
    margin: 0;
    font-size: 11px;
}

.amada-sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.amada-nav-simple .amada-sidebar-actions {
    display: none;
}

.amada-search-wrap {
    position: relative;
}

.amada-search {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    font: inherit;
    font-size: 12px;
    color: #d4bc94;
    background: #141414;
    border: 1px solid #2c2c2c;
    border-radius: 4px;
}

.amada-search::placeholder {
    color: #666;
}

.amada-search:focus {
    outline: none;
    border-color: #444;
}

.amada-search-results {
    position: fixed;
    z-index: 70;
    box-sizing: border-box;
    max-height: 70vh;
    overflow: auto;
    padding: 6px 0;
    background: #242424;
    border: 1px solid #4a4a4a;
    border-radius: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a #1a1a1a;
}

.amada-search-results[hidden] {
    display: none;
}

.amada-search-results table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 12px;
}

.amada-search-results th,
.amada-search-results td {
    border: none;
    padding: 4px 12px;
    vertical-align: baseline;
    background: transparent;
}

.amada-search-results td.amada-search-name {
    white-space: nowrap;
    padding-right: 16px;
}

.amada-search-results td.amada-search-path {
    color: #777;
    width: 100%;
}

.amada-search-results a {
    color: #e8d9be;
    text-decoration: none;
}

.amada-search-results a:hover {
    color: #fff;
    text-decoration: underline;
}

.amada-search-results tr:hover td {
    background: #2e2e2e;
}

.amada-search-empty {
    margin: 0;
    padding: 8px 12px;
    font-size: 12px;
    color: #777;
}

.amada-sidebar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.amada-single-focus {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #9a9a9a;
    cursor: pointer;
    user-select: none;
}

.amada-single-focus input {
    margin: 0;
    accent-color: #8ab4c4;
}

.amada-single-focus:hover {
    color: #c4c4c4;
}

.amada-collapse-all {
    padding: 4px 8px;
    font: inherit;
    font-size: 11px;
    color: #9a9a9a;
    background: #141414;
    border: 1px solid #2c2c2c;
    border-radius: 4px;
    cursor: pointer;
}

.amada-collapse-all:hover {
    color: #e8d9be;
    border-color: #444;
    background: #1a1a1a;
}

.amada-tree {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0 16px;
    font-size: 13px;
}

.amada-tree--restoring .nav-chevron,
.amada-tree--restoring .nav-folder::details-content {
    transition: none;
}

.amada-aux-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.amada-tree,
.amada-aux-list,
.amada-viewer-wrap {
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a #141414;
}

.amada-tree::-webkit-scrollbar,
.amada-aux-list::-webkit-scrollbar,
.amada-viewer-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.amada-tree::-webkit-scrollbar-track,
.amada-aux-list::-webkit-scrollbar-track,
.amada-viewer-wrap::-webkit-scrollbar-track {
    background: #141414;
}

.amada-tree::-webkit-scrollbar-thumb,
.amada-aux-list::-webkit-scrollbar-thumb,
.amada-viewer-wrap::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 6px;
    border: 2px solid #141414;
}

.amada-tree::-webkit-scrollbar-thumb:hover,
.amada-aux-list::-webkit-scrollbar-thumb:hover,
.amada-viewer-wrap::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

.amada-tree::-webkit-scrollbar-corner,
.amada-aux-list::-webkit-scrollbar-corner,
.amada-viewer-wrap::-webkit-scrollbar-corner {
    background: #141414;
}

.nav-folder {
    margin: 0;
}

.nav-folder-label {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px 4px calc(8px + var(--nav-depth, 0) * 14px);
    cursor: pointer;
    user-select: none;
    color: #c4c4c4;
    list-style: none;
}

.nav-folder--pinned > .nav-folder-label {
    cursor: default;
}

.nav-folder--pinned > .nav-folder-label .nav-chevron {
    visibility: hidden;
}

.nav-folder-label::-webkit-details-marker {
    display: none;
}

.nav-folder-label::marker {
    content: "";
}

.nav-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.55;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 10px no-repeat;
    transition: transform 250ms ease;
}

.nav-folder[open] > .nav-folder-label .nav-chevron {
    transform: rotate(90deg);
}

.nav-folder-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    opacity: 0.7;
    transition: opacity 150ms ease;
}

/* Rendező prefixű mappa (szám, vessző, szóköz) */
.nav-folder-name--sort-prefixed {
    color: #8aabc8;
}

.nav-folder-label:hover .nav-folder-name {
    opacity: 1;
}

.nav-folder-children {
    margin-left: 0;
}

.nav-folder[open] > .nav-folder-children {
    padding-bottom: 20px;
}

html {
    interpolate-size: allow-keywords;
}

@supports selector(::details-content) {
    .nav-folder::details-content {
        overflow: clip;
        height: 0;
        transition: height 250ms ease, content-visibility 250ms allow-discrete;
    }

    .nav-folder[open]::details-content {
        height: auto;
    }
}

.nav-doc {
    display: flex;
    align-items: baseline;
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 3px 10px 3px calc(22px + var(--nav-depth, 0) * 14px);
    border: none;
    background: transparent;
    color: #a89b7a;
    font: inherit;
    text-align: left;
    cursor: pointer;
    line-height: 1.35;
}

.nav-doc:hover,
.nav-doc:focus-visible {
    background: #1a1a1a;
    color: #e8d9be;
}

.nav-doc:focus {
    outline: none;
}

.nav-doc:focus-visible {
    outline: 1px solid #4a4a4a;
    outline-offset: -1px;
}

.nav-doc.is-active {
    background: #1f2a33;
    color: #f5e8cc;
}

.nav-doc-id {
    flex-shrink: 0;
    font-size: 10px;
    font-family: "JetBrains Mono", monospace;
    color: #666;
    min-width: 2.2em;
}

.nav-doc.is-active .nav-doc-id {
    color: #8ab4c4;
}

.nav-doc--checkpoint .nav-doc-title {
    opacity: 0.92;
}

.nav-doc--innote {
    color: #8aa89a;
}

.nav-doc--innote:hover {
    color: #c5e0d4;
}

.nav-doc--innote.is-active {
    color: #d5efe4;
}

.nav-doc-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amada-viewer-wrap {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    justify-content: center;
    background: #0d0d0d;
    overflow: auto;
}

.amada-viewer {
    width: 100%;
    max-width: 960px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.amada-viewer-placeholder {
    padding: 48px 24px;
    max-width: 36em;
    margin: auto;
    color: #9a9a9a;
}

.amada-viewer-placeholder h2 {
    margin-top: 0;
    font-size: 20px;
    border: none;
    padding: 0;
}

#amada-doc {
    display: none;
    box-sizing: border-box;
    width: 100%;
    padding: 24px 16px 48px;
}

#amada-doc.is-visible {
    display: block;
}

#amada-doc .meta {
    margin-bottom: 0;
}

.amada-doc-tools {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.amada-doc-tools button {
    box-sizing: border-box;
    width: calc(7ch + 20px);
    margin: 0;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: #222;
    color: #777;
    font: 11px "Segoe UI", system-ui, sans-serif;
    letter-spacing: 0.06em;
    text-align: center;
    cursor: pointer;
}

.amada-doc-tools button:hover,
.amada-doc-tools button:focus {
    outline: none;
    background: #333;
    color: #888;
}

.amada-ctx {
    position: fixed;
    z-index: 80;
    min-width: 196px;
    padding: 4px;
    background: #000;
    border: 1px solid #333;
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.amada-ctx[hidden] {
    display: none;
}

.amada-ctx button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 12px;
    min-height: 30px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: silver;
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.amada-ctx button:hover,
.amada-ctx button:focus {
    outline: none;
    background: #666;
    color: #fff;
}


@media print {
    @page {
        size: A4;
        margin: 14mm 16mm 16mm;
    }

    html,
    body.amada-shell {
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        padding: 0 !important;
        background: #fff !important;
        color: #1a1a1a !important;
    }

    .amada-sidebar,
    .amada-ctx,
    .amada-search-results,
    .amada-innote-popup {
        display: none !important;
    }

    .amada-doc-tools {
        display: flex !important;
        height: 12pt;
        min-height: 0;
        visibility: hidden;
    }

    .amada-doc-tools button {
        display: none !important;
    }

    .amada-layout,
    .amada-viewer-wrap,
    .amada-viewer {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        max-width: none !important;
        width: 100% !important;
        overflow: visible !important;
        background: #fff !important;
        flex: none !important;
    }

    .amada-viewer-placeholder {
        display: none !important;
    }

    #amada-doc,
    #amada-doc.is-visible {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
        background: #fff !important;
    }
}
