/* src/components/basic/XWUILayout/XWUILayout.css */
/**
 * XWUILayout Component Styles
 * Ant Design Layout: Header, Sider, Content, Footer.
 */
.xwui-layout {
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
}

.xwui-layout-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.xwui-layout-header {
  flex-shrink: 0;
  background: var(--color-layout-header-bg, var(--bg-primary));
  border-block-end: 1px solid var(--color-layout-border, rgba(0,0,0,0.06));
}

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

.xwui-layout-sider {
  flex-shrink: 0;
  background: var(--color-layout-sider-bg, var(--bg-primary));
  border-inline-end: 1px solid var(--color-layout-border, rgba(0,0,0,0.06));
}

.xwui-layout-content {
  flex: 1;
  min-width: 0;
  overflow: auto;
  background: var(--color-layout-content-bg, transparent);
}

.xwui-layout-footer {
  flex-shrink: 0;
  background: var(--color-layout-footer-bg, var(--bg-primary));
  border-block-start: 1px solid var(--color-layout-border, rgba(0,0,0,0.06));
}

/* Child combinators, as in every rule below: a descendant selector here made a
   horizontal layout nested in a vertical layout's content inherit its
   parent's column body and block-end divider, so its sider stacked on top of
   its content. */
.xwui-layout-vertical > .xwui-layout-main > .xwui-layout-body {
  flex-direction: column;
}

.xwui-layout-vertical > .xwui-layout-main > .xwui-layout-body > .xwui-layout-sider {
  border-inline-end: none;
  border-block-end: 1px solid var(--color-layout-border, rgba(0,0,0,0.06));
}

/* The divider belongs BETWEEN the panes. A sider after the content (the
   inline-end sider, siderPosition 'right') therefore draws it on its
   inline-start edge; the base rule's border-inline-end put it on the outer
   edge, which in Arabic is the physical left of the whole layout. Child
   combinators so a nested layout is never restyled by its parent. */
.xwui-layout-horizontal:not(.xwui-layout--stacked) > .xwui-layout-main > .xwui-layout-body > .xwui-layout-content + .xwui-layout-sider {
  border-inline-end: none;
  border-inline-start: 1px solid var(--color-layout-border, rgba(0,0,0,0.06));
}

/* A vertical sider keeps siderWidth, but never wider than its column: a 22rem
   sider in a 342px column used to overflow it by 10px. */
.xwui-layout-vertical > .xwui-layout-main > .xwui-layout-body > .xwui-layout-sider {
  max-inline-size: 100%;
}
.xwui-layout-vertical > .xwui-layout-main > .xwui-layout-body > .xwui-layout-content + .xwui-layout-sider {
  border-block-end: none;
  border-block-start: 1px solid var(--color-layout-border, rgba(0,0,0,0.06));
}

/* ---------------------------------------------------------------------------
   Stacked (conf_comp.stackBelow, and the layout measured narrower than it).
   Same DOM order, now a column: the sider spans the full width (the view
   leaves its inline width off) and the divider moves to the block edge that
   faces the content.
   --------------------------------------------------------------------------- */
.xwui-layout--stacked > .xwui-layout-main > .xwui-layout-body {
  flex-direction: column;
}
.xwui-layout--stacked > .xwui-layout-main > .xwui-layout-body > .xwui-layout-sider {
  border-inline-end: none;
  border-block-end: 1px solid var(--color-layout-border, rgba(0,0,0,0.06));
}
.xwui-layout--stacked > .xwui-layout-main > .xwui-layout-body > .xwui-layout-content + .xwui-layout-sider {
  border-block-end: none;
  border-block-start: 1px solid var(--color-layout-border, rgba(0,0,0,0.06));
}
