:root {
  color-scheme: light;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

p {
  margin: 0 0 0.75rem;
}

a {
  color: inherit;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
}

.field.attention {
  border: 1px dashed #06b6d4;
  border-radius: 0.75rem;
  background: #ecfeff;
  padding: 0.6rem;
}

.step {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.15rem 0.5rem;
  background: #cffafe;
  color: #0e7490;
  font-size: 0.72rem;
  font-weight: 700;
}

.drag-row {
  cursor: grab;
}

.drag-row:active {
  cursor: grabbing;
}

.drag-handle {
  user-select: none;
}

canvas {
  width: 100%;
  max-width: 100%;
  display: block;
}

.table .row > div {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

/* Better table readability: don't wrap code/identifiers by character */
.table code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table .row .row-actions {
  justify-content: flex-end;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-btn {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  border: 1px solid #d7dee8 !important;
  background: #fff !important;
  color: #334155 !important;
  transition: all .15s ease !important;
}

.icon-btn:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.icon-btn--danger:hover {
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
  color: #be123c !important;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity .12s ease;
}

.icon-btn:hover::after {
  opacity: 1;
}

@media (max-width: 900px) {
  .table {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .table .row.head {
    display: none !important;
  }

  .table .row {
    display: block !important;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem !important;
    background: #fff;
  }

  .table .row > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.2rem 0;
  }

  .table .row > div::before {
    content: attr(data-label);
    flex: 0 0 92px;
    max-width: 92px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.68rem;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
  }

  .table .row .row-actions {
    justify-content: flex-start;
  }

  .table .row .row-actions::before {
    content: none;
  }

  .btn {
    width: 100%;
  }

  .actions .btn,
  .row-actions .btn,
  .row-actions .icon-btn {
    width: auto;
  }
}
