/* The IDE shell: title bar, tool-window stripes, three docks (left, right, bottom) around a document area, status
   bar. */

/* a swipe to the side does not take the browser back or forward (see browser.ts) */
html {
  overscroll-behavior: none;
}

.titlebar {
  height: 40px;
  flex: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbtn {
  height: 28px;
  padding: 0 8px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tbtn:hover,
.tbtn.open {
  background: var(--hover);
}
.menus {
  display: flex;
}
.menus .tbtn {
  padding: 0 7px;
}
.pbadge {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.sync {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 12px;
  color: var(--muted);
}
.sync:hover {
  background: var(--hover);
  color: var(--fg);
}
.sync b {
  font-weight: 500;
  color: var(--fg);
}
.runw {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px;
}
#burger {
  display: none;
}
.ws {
  flex: 1;
  display: flex;
  min-height: 0;
}
.stripe {
  width: 40px;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  background: var(--bg);
}
#stripe-l {
  border-right: 1px solid var(--border);
}
#stripe-r {
  border-left: 1px solid var(--border);
}
.stripe div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sb {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.sb .i {
  width: 18px;
  height: 18px;
}
.sb:hover {
  background: var(--hover);
  color: var(--fg);
}
.sb.on {
  background: var(--accent);
  color: #fff;
}
/* the line between the two groups of a side, and the places a tool window that is dragged can go to */
.st-sep {
  width: 20px;
  align-self: center;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--border);
}
.st-sep.none {
  display: none;
}
.st-g {
  border-radius: 6px;
}
.st-g:empty {
  display: none;
}
.stripe.dropping .st-sep {
  display: block;
}
.stripe.dropping .st-g {
  display: flex;
  min-height: 30px;
  min-width: 30px;
  outline: 1px dashed var(--border);
}
.stripe.dropping .st-g.over {
  background: var(--hover);
  outline: 1px solid var(--accent);
}
.sb.drag {
  opacity: 0.5;
  cursor: grabbing;
}
.mid {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.up {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
}
.dock {
  background: var(--bg);
  display: flex;
  min-width: 0;
  min-height: 0;
}
#dock-left {
  width: 300px;
  flex: none;
  border-right: 1px solid var(--border);
}
#dock-right {
  width: 300px;
  flex: none;
  border-left: 1px solid var(--border);
}
#dock-bottom {
  height: 236px;
  flex: none;
  border-top: 1px solid var(--border);
}
#dock-left,
#dock-right {
  flex-direction: column;
}
/* one of the two groups of a side: they share it in halves until the splitter between them is dragged */
.dock-g {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
}
.dock.both > .dock-g:last-child {
  border-top: 1px solid var(--border);
}
#dock-bottom.both > .dock-g:last-child {
  border-top: 0;
  border-left: 1px solid var(--border);
}
.split,
.split-in {
  flex: none;
  z-index: 3;
  touch-action: none;
}
.split-in {
  height: 6px;
  margin: -3px 0;
  cursor: row-resize;
}
#dock-bottom > .split-in {
  width: 6px;
  height: auto;
  margin: 0 -3px;
  cursor: col-resize;
}
.split[data-split='left'],
.split[data-split='right'] {
  width: 6px;
  margin: 0 -3px;
  cursor: col-resize;
}
.split[data-split='bottom'] {
  height: 6px;
  margin: -3px 0;
  cursor: row-resize;
}
.split:hover,
.split-in:hover {
  background: var(--accent);
  opacity: 0.5;
}
.ed {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--editor);
}
.panel {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}
.ph {
  height: 34px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px 0 12px;
}
.ph b {
  font-weight: 600;
  margin-right: auto;
}
/* a column that fills what it is in: the body of a tool window, a tool of the document area, and the conversations that
   are over */
.pb,
.tool,
.ag-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
/* beside the branch, in the title bar: what the repository is in the middle of */
#w-branch .op {
  margin-left: 2px;
  padding: 0 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--yellow) 22%, transparent);
  font-size: 11px;
  line-height: 16px;
}
.statusbar {
  height: 24px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.statusbar .st {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  height: 20px;
  border-radius: 4px;
  flex: none;
}
button.st:hover {
  background: var(--hover);
  color: var(--fg);
}
.statusbar .path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  display: block;
  line-height: 20px;
}
.statusbar .i {
  width: 13px;
  height: 13px;
}
.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* narrow windows */
@media (max-width: 1180px) {
  .menus {
    display: none;
  }
  #burger {
    display: inline-grid;
  }
}
@media (max-width: 900px) {
  .runw,
  .hide-s {
    display: none;
  }
}
@media (max-width: 700px) {
  #dock-left,
  #dock-right {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 5;
    width: min(300px, calc(100% - 16px)) !important;
    box-shadow: var(--shadow);
  }
  #dock-left {
    left: 0;
  }
  #dock-right {
    right: 0;
  }
  .split[data-split='left'],
  .split[data-split='right'] {
    display: none;
  }
  #w-search,
  #w-gear,
  .titlebar > .logo-slot {
    display: none;
  }
}

/* The skeleton every part shows while the page waits for its project (skeleton.ts): grey bars in the shape of what the
   part will show, which shimmer unless motion is turned off. What the title bar holds of its own is out of sight until
   then, so the bars stand where its buttons will. */
.sk-wait .titlebar > :not(.logo-slot, .sp, .sk-part) {
  display: none;
}
.sk-wait .titlebar > #menus {
  display: flex;
}
.sk-bar {
  display: block;
  flex: none;
  border-radius: 3px;
  background: color-mix(in srgb, var(--muted) 18%, transparent);
  animation: sk-shimmer 1.4s ease-in-out infinite;
}
.sk-bar.round {
  border-radius: 6px;
}
.sk-still .sk-bar {
  animation: none;
}
@keyframes sk-shimmer {
  50% {
    opacity: 0.45;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sk-bar {
    animation: none;
  }
}
.sk-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.sk-sp {
  flex: 1;
}
.sk-tabs {
  gap: 0;
  align-self: stretch;
}
.sk-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 100%;
}
.sk-status {
  flex: 1;
  gap: 14px;
  padding: 0 6px;
}
.sk-body {
  overflow: hidden;
}
.sk-row {
  height: var(--row);
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
}
.sk-field {
  padding: 0 8px 6px 12px;
  flex: none;
}
.sk-head {
  padding: 8px 10px 4px;
}
.sk-subject {
  height: 30px;
}
.sk-pair .sk-bar:first-child {
  margin-right: auto;
}
.sk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.sk-message {
  margin-top: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sk-buttons {
  display: flex;
  gap: 8px;
}
.sk-talk {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sk-git {
  flex: 1;
  min-height: 0;
  display: flex;
  border-top: 1px solid var(--line);
}
.sk-git-br {
  width: var(--g-br, 230px);
  flex: none;
  border-right: 1px solid var(--line);
  padding: 4px 0;
}
.sk-git-log {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.sk-git-bar {
  height: 35px;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.sk-commit {
  gap: 12px;
  padding-left: 16px;
}
.sk-gap {
  flex: 1;
}
.sk-git-detail {
  width: 260px;
  flex: none;
  border-left: 1px solid var(--line);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sk-doc {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.sk-cards {
  width: min(78%, 520px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 36px;
}
.sk-card {
  height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
/* the lines of a text on its way, where the text will start; how many lines it has is not known, so they have no number */
.sk-lines {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 8px 0;
}
.sk-line {
  height: 20px;
  max-width: 760px;
  display: flex;
  align-items: center;
  padding-left: 58px;
}
