/**
 * Kali XFCE — Mousepad + xfwm Kali-Dark (SSD).
 * Chrome titre : xfwm-window-chrome.css. Ne pas masquer #windowHeader.
 */
html:has(#kali) {
    --win-text_editor-width: 736px;
    --win-text_editor-height: 512px;
    --win-text_editor-min-width: 448px;
    --win-text_editor-min-height: 256px;
}

body#xubuntu {
    --win-text_editor-width: 736px;
    --win-text_editor-height: 512px;
    --win-text_editor-min-width: 448px;
    --win-text_editor-min-height: 256px;
    --xed-chrome-bg: #23252e;
    --xed-status-bg: #1c1e26;
    --xed-buffer-bg: #1a1c24;
    --xed-buffer-text: #eeeeec;
    --xed-text: #eeeeec;
    --xed-border: #111217;
    --xed-menu-surface-bg: #2a2d36;
    --xed-menu-hover-bg: rgba(255, 255, 255, 0.08);
    --xed-toolbar-hover-bg: rgba(255, 255, 255, 0.08);
    --xed-toolbar-active-bg: rgba(39, 119, 255, 0.22);
    --xed-toolbar-icon-filter: none;
    --xed-mono-font: "Liberation Mono", "DejaVu Sans Mono", ui-monospace, monospace;
}

body#xubuntu .windowElement[data-link="text_editor"] {
    display: flex;
    flex-direction: column;
    width: min(46rem, calc(100vw - 2.5rem));
    height: min(32rem, calc(100vh - 4rem));
    min-width: 28rem;
    min-height: 16rem;
    padding: 0;
    overflow: hidden;
    color: var(--xed-text);
    background: var(--xed-chrome-bg);
}

body#xubuntu .windowElement[data-link="text_editor"].gnome-app--csd {
    border-radius: 0;
}

body#xubuntu .windowElement[data-link="text_editor"] > #windowHeader {
    display: grid;
    background: var(--kali-xfwm-bg, #23252e);
    border-bottom: 1px solid var(--kali-xfwm-edge, #111217);
}

body#xubuntu .windowElement[data-link="text_editor"] #windowTitle {
    color: var(--kali-xfwm-title, #ffffff);
    font-size: 12px;
    font-weight: 700;
}

body#xubuntu .windowElement[data-link="text_editor"] .xed-app__tabs--cinnamon,
body#xubuntu .windowElement[data-link="text_editor"] #xed-gnome-tabs,
body#xubuntu .windowElement[data-link="text_editor"] .xed-menu__item--gnome-only {
    display: none;
}

body#xubuntu main#xedApp {
    color: var(--xed-text);
    background: var(--xed-chrome-bg);
    font-family: var(--font-ui, 'Cantarell', sans-serif);
}

body#xubuntu .xed-app__menubar,
body#xubuntu .xed-app__toolbar {
    min-height: 24px;
    padding: 0 4px;
    border-bottom: 1px solid var(--xed-border);
    color: var(--xed-text);
    background: var(--xed-chrome-bg);
}

body#xubuntu .xed-menu__trigger {
    height: 24px;
    padding: 0 12px;
    border: 0;
    border-radius: 0;
    color: var(--xed-text);
    background: transparent;
    font-family: var(--font-ui, 'Cantarell', sans-serif);
    font-size: 11px;
}

body#xubuntu .xed-menu__trigger:hover,
body#xubuntu .xed-menu__trigger[aria-expanded="true"] {
    background: var(--xed-menu-hover-bg);
}

body#xubuntu .xed-menu__dropdown {
    background: var(--xed-menu-surface-bg);
    border-color: var(--xed-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body#xubuntu .xed-menu__item {
    color: var(--xed-text);
}

body#xubuntu .xed-app__tool:hover {
    background: var(--xed-toolbar-hover-bg);
    border-color: transparent;
}

body#xubuntu .xed-app__tool img,
body#xubuntu .xed-app__tool-icon {
    width: 16px;
    height: 16px;
    margin: 0 auto;
    background: transparent;
    filter: none;
    -webkit-mask-image: none;
    mask-image: none;
}

body#xubuntu .xed-app__toolbar-sep {
    width: 1px;
    height: 16px;
    margin: 0 4px;
    background: rgba(238, 238, 236, 0.18);
}

body#xubuntu .xed-app__editor-wrap,
body#xubuntu .xed-app__area {
    color: var(--xed-buffer-text);
    background: var(--xed-buffer-bg);
    font-family: var(--xed-mono-font);
    font-size: 12px;
    line-height: 1.4;
}

body#xubuntu .xed-app__area {
    padding: 8px 10px;
    background: transparent;
}

body#xubuntu .xed-app__status {
    min-height: 22px;
    padding: 0 8px;
    border-top: 1px solid var(--xed-border);
    color: #8c8f94;
    background: var(--xed-status-bg);
}

body#xubuntu .xed-app__status-sidebar-btn {
    display: none;
}

body#xubuntu .xed-app__toolbar {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 2px;
}

body#xubuntu .xed-app__toolbar-grow {
    flex: 1 1 auto;
}

body#xubuntu .xed-app__tool {
    width: 28px;
    height: 24px;
    min-width: 28px;
    padding: 0;
    border: 0;
    background: transparent;
}

body#xubuntu .xed-app__tool-glyph {
    width: 16px;
    height: 16px;
    margin: 0 auto;
}

body#xubuntu .xed-app__tool[data-xed-action="save-as"] .xed-app__tool-glyph {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M3.5 2.5h6.2L13 5.8V13.5H3.5V2.5zm1 1v9h7.5V6.4H9V3.5H4.5zM6 9.2h3.2v2.2H6V9.2zm6.2-8 .8.8-2 2h1.6v1H9.4V3.4h1.6z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M3.5 2.5h6.2L13 5.8V13.5H3.5V2.5zm1 1v9h7.5V6.4H9V3.5H4.5zM6 9.2h3.2v2.2H6V9.2zm6.2-8 .8.8-2 2h1.6v1H9.4V3.4h1.6z'/%3E%3C/svg%3E");
}

body#xubuntu .xed-app__tool[data-xed-action="revert"] .xed-app__tool-glyph {
    background: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M8 2.2V.6L4.8 3.2 8 5.8V4.2a3.8 3.8 0 1 1-3.4 3.6H2.8A5.2 5.2 0 1 0 8 2.2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M8 2.2V.6L4.8 3.2 8 5.8V4.2a3.8 3.8 0 1 1-3.4 3.6H2.8A5.2 5.2 0 1 0 8 2.2z'/%3E%3C/svg%3E");
}

body#xubuntu .xed-app__tool[data-xed-action="close"] .xed-app__tool-glyph {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M4.2 3.4 8 7.2l3.8-3.8.8.8L8.8 8l3.8 3.8-.8.8L8 8.8l-3.8 3.8-.8-.8L7.2 8 3.4 4.2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M4.2 3.4 8 7.2l3.8-3.8.8.8L8.8 8l3.8 3.8-.8.8L8 8.8l-3.8 3.8-.8-.8L7.2 8 3.4 4.2z'/%3E%3C/svg%3E");
}

body#xubuntu .xed-app__tool[data-xed-action="goto-line"] .xed-app__tool-glyph {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M3 3h10v1.2H3V3zm0 3h6.5v1.2H3V6zm0 3h10v1.2H3V9zm7.2-1.2 3.3 3.3-3.3 3.3V12H8.4v-1.4h1.8V7.8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M3 3h10v1.2H3V3zm0 3h6.5v1.2H3V6zm0 3h10v1.2H3V9zm7.2-1.2 3.3 3.3-3.3 3.3V12H8.4v-1.4h1.8V7.8z'/%3E%3C/svg%3E");
}

body#xubuntu .xed-app__tool[data-xed-action="fullscreen"] .xed-app__tool-glyph {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M3 3h4v1.3H4.3V7H3V3zm6 0h4v4h-1.3V4.3H9V3zM3 9h1.3v2.7H7V13H3V9zm7.7 2.7V13H13V9h-1.3v2.7H9.7z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M3 3h4v1.3H4.3V7H3V3zm6 0h4v4h-1.3V4.3H9V3zM3 9h1.3v2.7H7V13H3V9zm7.7 2.7V13H13V9h-1.3v2.7H9.7z'/%3E%3C/svg%3E");
}

body#xubuntu .xed-app__editor-wrap {
    position: relative;
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
    min-height: 0;
    flex: 1 1 auto;
}

/* GT vm-mousepad : ligne courante en bande pleine largeur, pas une colonne gutter. */
body#xubuntu .xed-app__editor-wrap::before {
    position: absolute;
    top: 8px;
    right: 0;
    left: 0;
    display: block;
    height: 16.8px;
    background: #32343c;
    content: '';
    pointer-events: none;
    z-index: 0;
}

body#xubuntu .xed-app__gutter {
    position: relative;
    flex: 0 0 28px;
    width: 28px;
    padding: 8px 4px 8px 0;
    border-right: 0;
    color: #d8d8d8;
    background: transparent;
    font-family: var(--xed-mono-font);
    font-size: 12px;
    line-height: 1.4;
    text-align: right;
    z-index: 1;
}

body#xubuntu .xed-app__editor-wrap .xed-app__area {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    z-index: 1;
}
