/* Shared controls used by this Block. Colors resolve through BluUITheme. */
.blu-common-button{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:36px;
  padding:7px 13px;
  border:1px solid var(--bluui-border,#dce3ed);
  border-radius:8px;
  background:var(--bluui-surface,#fff);
  color:var(--bluui-text,#182333);
  font:inherit;
  font-size:13px;
  font-weight:600;
  line-height:1.4;
  white-space:nowrap;
  cursor:pointer;
  text-decoration:none;
  box-shadow:none
}
.blu-common-button:hover:not(:disabled){
  background:var(--bluui-surface-muted,#f4f6fa);
  border-color:var(--bluui-primary,#5144ed)
}
.blu-common-button--primary{
  background:var(--bluui-color-primary-solid,#5144ed);
  color:var(--bluui-color-primary-contrast,#fff);
  border-color:transparent
}
.blu-common-button--primary:hover:not(:disabled){
  background:var(--bluui-color-primary-solid,#5144ed);
  filter:brightness(.93)
}
.blu-common-button:disabled{
  opacity:.45;
  cursor:not-allowed
}
.blu-common-button:focus-visible,.blu-pagination input:focus-visible,.blu-pagination select:focus-visible{
  outline:3px solid var(--bluui-primary,#5144ed);
  outline-offset:2px
}
.blu-common-muted{
  color:var(--bluui-text-muted,#68758b);
  font-size:14px
}
.blu-common-error{
  color:var(--bluui-color-error-text,#b42318);
  font-size:13px;
  margin:8px 0
}
.blu-common-error[hidden]{
  display:none!important
}

/* Top-layer overlay. Native Content and Footer widgets stay alive while closed. */
.blu-overlay{
  position:fixed;
  inset:0;
  width:100vw;
  height:100dvh;
  max-width:none;
  max-height:none;
  border:0;
  margin:0;
  padding:24px;
  box-sizing:border-box;
  background:rgba(8,14,27,.52);
  backdrop-filter:blur(3px);
  z-index:1100;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--bluui-text)
}
.blu-overlay[hidden]{
  display:none!important
}
.blu-overlay::backdrop{
  background:transparent
}
.blu-overlay__panel{
  width:min(560px,100%);
  max-height:calc(100dvh - 48px);
  display:flex;
  flex-direction:column;
  border:1px solid var(--bluui-border);
  border-radius:18px;
  background:var(--bluui-surface);
  box-shadow:0 28px 90px #0005;
  outline:none;
  overflow:hidden
}
.blu-overlay[data-size=small] .blu-overlay__panel{
  width:min(400px,100%)
}
.blu-overlay[data-size=large] .blu-overlay__panel{
  width:min(800px,100%)
}
.blu-overlay__header{
  position:relative;
  padding:24px 64px 20px 24px;
  border-bottom:1px solid var(--bluui-border)
}
.blu-overlay__header h2{
  font-size:21px;
  line-height:1.35;
  letter-spacing:-.02em;
  margin:0
}
.blu-overlay__description{
  margin:8px 0 0;
  font-size:14px;
  line-height:1.6;
  color:var(--bluui-text-muted)
}
.blu-overlay__description[hidden]{
  display:none
}
.blu-overlay__close{
  position:absolute;
  right:18px;
  top:20px;
  padding:0;
  width:34px;
  min-height:34px;
  font-size:23px;
  border:0;
  background:transparent
}
.blu-overlay__content{
  padding:24px;
  overflow:auto;
  min-height:0;
  line-height:1.6
}
.blu-overlay__footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding:16px 24px;
  background:var(--bluui-surface-muted);
  border-top:1px solid var(--bluui-border)
}
.blu-overlay__footer[hidden]{
  display:none
}
.blu-overlay__actions{
  display:flex;
  gap:8px;
  margin-left:auto
}
.blu-overlay__actions[hidden]{
  display:none
}
/* Drawer variations share the same overlay and focus behavior. */
.blu-overlay--drawer{
  padding:0;
  justify-content:flex-end;
  align-items:stretch
}
.blu-overlay--drawer .blu-overlay__panel{
  max-height:100dvh;
  border-radius:0;
  width:min(480px,calc(100vw - 24px))
}
.blu-overlay--drawer .blu-overlay__content{
  flex:1
}
.blu-overlay--drawer[data-placement=left]{
  justify-content:flex-start
}
.blu-overlay--drawer[data-placement=left] .blu-overlay__panel{
  border-radius:0
}
.blu-overlay--drawer[data-placement=bottom]{
  align-items:flex-end;
  justify-content:center
}
.blu-overlay--drawer[data-placement=bottom] .blu-overlay__panel{
  width:100%;
  max-height:85dvh;
  border-radius:0
}
@media(max-width:600px){.blu-overlay{
  padding:12px
}
.blu-overlay--drawer{
  padding:0
}
.blu-overlay__panel{
  max-height:calc(100dvh - 24px)
}
.blu-overlay__header,.blu-overlay__content{
  padding:20px
}
.blu-overlay__header{
  padding-right:56px
}
.blu-overlay__footer{
  padding:14px 20px
}}

/* Hide the canvas-only caption once this instance has initialized. */
.blu-drawer-block:has([data-blu-ready]) > .blu-component-preview {
  display: none;
}

/* Keep the Drawer square when another overlay component loads its shared rules. */
.blu-overlay.blu-overlay--drawer[data-placement] .blu-overlay__panel {
  border-radius: 0;
}
