/* New sheet window: examples, the file picker and the blank sheet (js/ui/newSheetWindow.js). */

#newSheetWindow {
  width: min(680px, 94vw);
  max-height: min(820px, 90vh);
  padding: 0;
  overflow: hidden
}

/* The header and buttons stay put; the examples scroll between them. */
#newSheetWindow[open] {
  display: flex;
  flex-direction: column
}

#newSheetWindow .newSheetBody {
  flex: 1;
  min-height: 0;
  overflow-y: auto
}

.newSheetHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 6px 20px
}

.newSheetHeader h3 {
  margin: 0;
  font-size: 18px
}

.closeButton {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--mutedText);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0
}

.closeButton:hover {
  background: var(--panel);
  color: var(--text)
}

.closeButton svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round
}

.newSheetBody {
  padding: 6px 20px 20px
}

.examplesHeading {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mutedText);
  margin: 0 0 10px
}

#exampleCards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px
}

@media(max-width:560px) {
  #exampleCards {
    grid-template-columns: repeat(2, 1fr)
  }
}

.exampleCard {
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  font: inherit
}

.exampleCard:hover,
.exampleCard:focus-visible {
  border-color: var(--accent);
  outline: none
}

.exampleCard[aria-pressed=true] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent)
}

.exampleCard[aria-pressed=true] .exampleThumbnail {
  background: color-mix(in srgb, var(--accent) 10%, var(--panel))
}

.exampleCard .exampleThumbnail {
  background: var(--panel);
  height: 120px;
  padding: 10px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--line)
}

.exampleCard .exampleThumbnail svg {
  display: block;
  width: 100%;
  height: 100%
}

.exampleCard .exampleText {
  padding: 9px 11px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px
}

.exampleCard b {
  font-size: 13.5px;
  font-weight: 600
}

.exampleCard span {
  font-size: 12px;
  color: var(--mutedText);
  line-height: 1.4
}

.newSheetFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--panel)
}

.newSheetNote {
  font-size: 12px;
  color: var(--mutedText)
}

.newSheetButtons {
  display: flex;
  gap: 8px;
  flex: none
}

.newSheetFooter .btn {
  min-height: 34px
}

.newSheetFooter .btn.primary {
  color: var(--bg)
}

.examplesNote {
  grid-column: 1/-1;
  margin: 8px 0;
  font-size: 13px;
  color: var(--mutedText);
}

.examplesPicker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.examplesPicker .btn {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  font-size: 13px;
}

.examplesNote p {
  margin: 0;
}
