/* ============================================================
   Xucho — niri mode styling.
   Workspace surfaces, overview backdrop, insert hint, tab
   strips. Focus rings are painted inline per frame (they
   animate), these are the static pieces.
   ============================================================ */

[data-niri-stage] {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Overview backdrop (niri overview.backdrop-color 0.15 alpha). */
.niri-backdrop {
  position: absolute;
  inset: 0;
  background: #262626;
  opacity: 0;
  pointer-events: none;
}

/* Workspace background copies (wallpaper + overview shadow). */
.niri-ws-layer {
  position: absolute;
  inset: 0;
}
.niri-ws-bg {
  position: absolute;
  left: 0;
  top: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  pointer-events: auto;   /* background gestures + overview clicks */
  touch-action: none;
}

/* All tiles live here; never reparented. */
.niri-tile-layer {
  position: absolute;
  inset: 0;
}

[data-niri-tile] {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  contain: layout;
  pointer-events: auto;   /* desktop layers are none; tiles re-enable */
}

/* Fullscreen tiles: hide the floating chrome. */
[data-niri-tile].fullscreen .window-surface-backing {
  border-radius: 0;
}

/* Insert hint (niri insert-hint: #7fc8ff at 50% alpha). */
.niri-hint-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.niri-insert-hint {
  position: absolute;
  left: 0;
  top: 0;
  background: rgba(127, 200, 255, 0.5);
  border-radius: 8px;
  pointer-events: none;
}

/* Tab strips (niri tab indicator). */
.niri-tab-strip {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 3px 6px 0;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: auto;
  z-index: 2000;
}
.niri-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
  padding: 3px 10px;
  border: 0;
  border-radius: 6px 6px 0 0;
  background: color-mix(in oklab, var(--color-default) 78%, transparent);
  color: var(--text-primary);
  font-family: var(--font-ui);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}
.niri-tab img {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
.niri-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.niri-tab.active {
  background: var(--color-default);
  box-shadow: inset 0 -2px 0 0 #7fc8ff;
  font-weight: 600;
}

/* The tile container fills the tile box (Phresh windows set insets inline;
   niri tiles always fill). */
[data-niri-tile] > [data-window-container] {
  position: absolute;
  inset: 0;
}
