/* The dialog from its button: a light card on a white page, the deleting in red. */
:root {
  --page: #ffffff;          /* the page */
  --ink: #1d1c19;
  --muted: #84817a;
  --line: #ebe9e3;
  --danger: #d6382a;        /* deleting */
  --danger-soft: #fdebe8;   /* the Delete button, and where the window starts */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Libre Franklin Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.project {
  width: min(460px, 100%);
}

.project__card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 36px -26px rgba(29, 28, 25, 0.35);
}

.project__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #f3f1ec;
}

.project__icon svg,
.dialog__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project__title {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.project__meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.project__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  grid-column: 1 / -1;
}

.project__gone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 16px 22px;
  border: 1.5px dashed var(--line);
  border-radius: 22px;
}

.project__card[hidden],
.project__gone[hidden] {
  display: none;
}

.project__gone-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  position: relative;
  padding: 11px 18px;
  border: 0;
  border-radius: 12px;
  font: 650 15px 'Libre Franklin Variable', system-ui, sans-serif;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.2s, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.96);
}

.btn--plain {
  background: #f3f1ec;
  color: var(--ink);
}

.btn--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn--solid {
  background: var(--danger);
  color: #ffffff;
}

@media (hover: hover) {
  .btn--plain:hover {
    background: #ebe8e1;
  }

  .btn--danger:hover {
    background: #fbdcd7;
  }
}

/* the bar that fills the confirm button while deleting */
.btn__fill {
  position: absolute;
  inset: 0;
  background: #a8261b;
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.btn__label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn__label svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

html[data-using='pointer'] .btn:focus-visible {
  outline: none;
}

/* ---------------------------------------------------------------- the window */
.layer {
  position: fixed;
  inset: 0;
  z-index: 10;
}

.layer[hidden] {
  display: none;
}

.layer__dim {
  position: absolute;
  inset: 0;
  background: rgba(24, 22, 18, 0);
}

/* the surface that grows from the button into the window, and goes back */
.layer__shell {
  position: absolute;
  top: 0;
  left: 0;
  background: #ffffff;
  box-shadow: 0 30px 70px -30px rgba(24, 22, 18, 0.55);
}

.dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(380px, calc(100vw - 32px));
  padding: 26px 24px 22px;
  transform: translate(-50%, -50%);
  outline: none;
}

.dialog__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
}

.dialog__title {
  margin: 16px 0 0;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.dialog__text {
  margin: 8px 0 0;
  color: #66635c;
  font-size: 15px;
  line-height: 1.5;
}

.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
