/* Chrome window controls live in the tab strip. The whole cell is clickable. */
.window-controls {
  display: inline-flex;
  flex: none;
  align-self: stretch;
  align-items: center;
  padding: 0 6px 0 2px;
}
#session .window-controls button {
  display: grid;
  place-items: center;
  width: 25px;
  min-width: 24px;
  height: 32px;
  align-self: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #492421;
}
.window-controls i {
  position: relative;
  display: block;
  width: 12px;
  height: 12px;
  border: 1px solid #0003;
  border-radius: 50%;
  pointer-events: none;
}
#window-close i { background: #ff6159; }
#window-minimize i { background: #ffbd2e; }
#window-fullscreen i { background: #2bc840; }
.window-controls i::before,
.window-controls i::after {
  position: absolute;
  content: "";
  opacity: 0;
}
.window-controls:hover i::before,
.window-controls:hover i::after,
.window-controls:focus-within i::before,
.window-controls:focus-within i::after { opacity: 1; }
#window-close i::before,
#window-close i::after,
#window-minimize i::before {
  inset: 4.5px 2px auto;
  height: 1.5px;
  background: #572820;
}
#window-close i::before { transform: rotate(45deg); }
#window-close i::after { transform: rotate(-45deg); }
#window-minimize i::before { background: #644a07; }
#window-fullscreen i::before,
#window-fullscreen i::after {
  width: 0;
  height: 0;
  border: 2px solid transparent;
}
#window-fullscreen i::before {
  top: 2px; left: 2px;
  border-top-color: #124c1f;
  border-left-color: #124c1f;
}
#window-fullscreen i::after {
  bottom: 2px; right: 2px;
  border-bottom-color: #124c1f;
  border-right-color: #124c1f;
}
#window-fullscreen[aria-pressed="true"] i { transform: rotate(90deg); }
#session .window-controls button:focus-visible { outline: 2px solid var(--brand-action); outline-offset: -2px; }
@media (hover: none) {
  .window-controls i::before, .window-controls i::after { opacity: 1; }
}
.sample-fullscreen {
  overflow: hidden;
}
#session[data-window="fullscreen"] {
  position: fixed;
  z-index: 110;
  inset: 0;
  box-sizing: border-box;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  background: var(--brand-paper);
}
#session[data-window="fullscreen"] .workbench {
  width: 100%;
  max-width: none;
  height: 100%;
  padding: 0;
}
#session[data-window="fullscreen"] .browser-window {
  border-radius: 0;
  border: 0;
}
#session:is([data-window="minimized"], [data-window="closed"]) {
  height: 92px;
  overflow: hidden;
}
#session:is([data-window="minimized"], [data-window="closed"]) .workbench {
  display: grid;
  align-content: center;
  justify-content: center;
  padding: 10px 16px;
}
#window-restore {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  min-width: min(330px, 85vw);
  color: var(--brand-ink);
  background: #f4f7fa;
  border: 1px solid #bcc8d4;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(38, 58, 79, .12);
  text-align: left;
  font-family: var(--ui);
}
#window-restore:hover {
  background: #e8eef5;
  border-color: #879bad;
}
#window-restore img {
  width: 27px;
  height: 27px;
  object-fit: contain;
}
.dock-document {
  flex: 1;
  display: grid;
  gap: 2px;
}
.dock-document strong {
  font-size: 0.91rem;
  line-height: 1.2;
}
.dock-document small {
  font-size: 0.76rem;
  color: #505e6e;
}
.dock-action {
  font-size: 0.77rem;
  color: var(--brand-action);
}
@media (forced-colors: active) {
  #session .window-controls i { border: 1px solid CanvasText; }
  .window-controls i::before, .window-controls i::after { opacity: 1; }
  #window-restore { border-color: ButtonText; }
}
#session:is([data-window="minimized"], [data-window="closed"]) .browser-window,
#window-restore[hidden] {
  display: none;
}
@media (max-width: 700px) {
  .window-controls {
    padding: 0 4px 0 0;
    gap: 0;
  }
  #session .window-controls button {
    width: 25px;
    height: 25px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  #session[data-auto-send="pending"] #dispatch-send {
    animation: send-cue 1650ms cubic-bezier(0.25, 0.7, 0.4, 1) both;
  }
  @keyframes send-cue {
    0%,
    30% {
      box-shadow: 0 0 0 0 transparent;
    }
    80%,
    100% {
      box-shadow: 0 0 0 4px rgb(113 150 194 / 25%);
    }
  }
}
