/* MCreator Default Dark colors from mcreator-themes/themes/default_dark/theme.json.
   Accent: ColorScheme.MAIN_TINT_DEFAULT. Original editor controls stay in editor*.css. */
:root {
    --backgroundColor: #232323;
    --backgroundColorTransparent: #232323e4;
    --backgroundColorBrighter: #323232;
    --altBackgroundColor: #383838;
    --secondAltBackgroundColor: #1e1e1e;
    --foregroundColor: #f3f3f3;
    --altForegroundColor: #c2c2c2;
    --interfaceAccentColor: #93c54b;
    color-scheme: dark;
}

button, input, select { font: inherit; }
button:focus-visible, [tabindex]:focus-visible, a:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
}

/* Only the standalone shell is styled here. */
#sitebar {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 46px;
    padding: 6px 10px;
    flex-shrink: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
}
.brand {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--fg);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.brand img { width: 24px; height: 24px; image-rendering: pixelated; }
.brand small { display: block; font-size: 10px; font-weight: 400; color: var(--altForegroundColor); }
.project-title { flex: 1; min-width: 0; }
.project-title > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#projectName { font-weight: 600; }
#saveStatus { color: var(--altForegroundColor); font-size: 10px; margin-top: 2px; }
.site-actions { display: flex; gap: 6px; }
.site-actions .primary { margin-left: 5px; }
#topbar { flex-shrink: 0; }
#breadcrumb { max-width: 40%; overflow: auto; }

#library {
    flex: 0 0 190px;
    width: 190px;
    display: flex;
    flex-direction: column;
    overflow: auto;
    padding: 10px 7px;
    background: var(--bg2);
    border-right: 1px solid var(--border);
}
.panel-heading {
    display: flex;
    justify-content: space-between;
    padding: 0 4px 9px;
    font-weight: 600;
}
#contentCount { font-size: 11px; font-weight: 400; opacity: .6; }
#tree { display: flex; flex-direction: column; gap: 2px; }
.tree-book, .tree-category, .tree-entry {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    width: 100%;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--fg);
    text-align: left;
    cursor: pointer;
}
.tree-book { font-weight: 600; margin-bottom: 5px; }
.tree-entry { padding-left: 28px; font-size: 11px; }
.tree-entry:hover, .tree-category:hover, .tree-book:hover { background: rgba(128,128,128,.2); }
.tree-active { border-color: var(--accent); background: rgba(128,128,128,.15); }
.tree-icon { width: 16px; height: 16px; image-rendering: pixelated; object-fit: contain; }
.tree-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-add {
    margin-left: 28px;
    padding: 4px 0 6px;
    border: 0;
    background: transparent;
    color: var(--altForegroundColor);
    text-align: left;
    font-size: 11px;
    cursor: pointer;
}
.tree-add:hover, .text-button:hover { color: var(--accent); }
.add-category { margin-top: 10px; }
.library-footer { margin-top: auto; padding: 24px 4px 0; font-size: 10px; line-height: 1.7; color: var(--altForegroundColor); }
.library-footer small { font-size: 10px; }
.local-dot { display: inline-block; width: 4px; height: 4px; margin-right: 4px; background: var(--altForegroundColor); vertical-align: middle; }
.text-button { display: block; padding: 7px 0 0; border: 0; background: transparent; color: var(--fg); font-size: 10px; text-align: left; cursor: pointer; }
.empty-library { padding: 7px; opacity: .6; line-height: 1.6; font-size: 11px; }

#canvas { display: flex; flex-direction: column; flex: 1; min-width: 0; background: var(--bg); }
.canvas-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    background: var(--bg);
    color: var(--altForegroundColor);
    font-size: 10px;
}
.canvas-footer { border-top: 1px solid var(--border); }
#inspector { padding: 8px; }
.custom-value { margin-top: 5px; }
.custom-value label { display: block; margin-bottom: 3px; opacity: .75; font-size: 11px; }
.csel-popup { z-index: 10000; }

dialog {
    width: min(540px, calc(100vw - 24px));
    max-height: 90vh;
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--bg2);
    color: var(--fg);
    box-shadow: 0 8px 30px #0008;
}
dialog::backdrop { background: rgba(0,0,0,.6); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.dialog-head h1 { margin: 2px 0 9px; font: 600 16px 'Segoe UI', Arial, sans-serif; }
.eyebrow { color: var(--altForegroundColor); font-size: 10px; margin-bottom: 4px; }
.icon-button { border: 0; padding: 0 3px; background: transparent; color: var(--fg); font-size: 19px; cursor: pointer; }
dialog p { font-size: 12px; line-height: 1.6; }
.muted { color: var(--altForegroundColor); }
.export-label { display: block; margin: 12px 0 4px; font-size: 11px; opacity: .75; }
dialog input, dialog select, .custom-value input {
    width: 100%;
    min-width: 0;
    padding: 4px 6px;
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 0;
    outline: none;
}
dialog input:focus, dialog select:focus, .custom-value input:focus { border-color: var(--accent); }
.export-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 7px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 14px; }
.file-details { margin-top: 15px; background: var(--bg); border: 1px solid var(--border); font-size: 11px; }
.file-details summary { padding: 7px; cursor: pointer; }
.file-details pre { max-height: 180px; overflow: auto; padding: 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 10px; line-height: 1.7; color: var(--altForegroundColor); }
.export-note { font-size: 11px; color: var(--altForegroundColor); }
.error-message { color: #ef9a9a; white-space: pre-line; font-size: 11px; line-height: 1.6; margin-top: 9px; }
.item-results { display: grid; grid-template-columns: repeat(auto-fill,minmax(90px,1fr)); gap: 5px; max-height: 380px; overflow: auto; padding: 9px 1px; margin-top: 6px; }
.item-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 77px; padding: 8px 4px; border: 1px solid var(--border); border-radius: 0; background: var(--bg); color: var(--fg); cursor: pointer; font-size: 10px; text-align: center; }
.item-choice:hover { border-color: var(--accent); background: rgba(128,128,128,.2); }
.item-choice img { width: 32px; height: 32px; image-rendering: pixelated; }
.custom-item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.custom-item label { display: block; margin-bottom: 5px; font-size: 11px; opacity: .75; }
.custom-item button { white-space: nowrap; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); max-width: 90vw; padding: 9px 14px; border: 1px solid var(--accent); background: var(--bg2); color: var(--fg); z-index: 10001; font-size: 12px; }

@media (max-width: 1000px) {
    #library { flex-basis: 160px; width: 160px; }
    #sitebar { gap: 12px; }
    .site-actions { gap: 4px; }
}
@media (max-width: 800px) {
    #sitebar { flex-wrap: wrap; gap: 8px; }
    .site-actions { width: 100%; }
    .site-actions .primary { margin-left: auto; }
    #topbar { flex-wrap: wrap; gap: 7px; }
    #breadcrumb { max-width: 100%; }
    #formatbar { width: 100%; }
    #workspace { flex-wrap: wrap; overflow: auto; }
    #library { flex: 0 0 150px; width: 150px; min-height: 350px; }
    #canvas { width: calc(100% - 150px); min-height: 350px; }
    #stage { min-height: 290px; }
    #inspector { flex: 1 0 100%; width: 100%; max-width: none; overflow: visible; border-left: 0; border-top: 1px solid var(--border); }
    .canvas-footer > span + span { display: none; }
    .csel-popup { max-width: calc(100vw - 20px); }
}
@media (max-width: 540px) {
    #workspace { display: block; overflow: auto; }
    #library { width: 100%; min-height: 0; max-height: 145px; padding: 9px 7px; border-right: 0; border-bottom: 1px solid var(--border); }
    #tree { flex-direction: row; overflow: auto; gap: 5px; }
    #tree button { flex: 0 0 auto; width: auto; max-width: 160px; padding: 5px; margin: 0; }
    .library-footer { display: none; }
    #canvas { width: 100%; height: 350px; min-height: 350px; }
    #inspector { width: 100%; }
    .export-columns { grid-template-columns: 1fr; }
}
