/* Toolbox 3.5.44 persistent per-user scratchpad. */
.topbar-icon-button {
  width: 2.6rem;
  height: 2.6rem;
  padding: 0.55rem;
  display: inline-grid;
  place-items: center;
  background: #235cff !important;
}
.topbar-icon-button svg,
.toolbox-scratchpad-icon-button svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.toolbox-scratchpad-window[hidden] {
  display: none !important;
}
.toolbox-scratchpad-window {
  position: fixed;
  z-index: 900;
  width: min(500px, calc(100vw - 32px));
  height: min(470px, calc(100vh - 100px));
  min-width: 340px;
  min-height: 330px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: #ffffff;
  color: #172033;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.toolbox-scratchpad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dbe3ef;
  background: #f8fafc;
}
.toolbox-scratchpad-drag-handle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.8rem 0.95rem;
  cursor: move;
  user-select: none;
  touch-action: none;
}
.toolbox-scratchpad-grip {
  color: #102a63;
  font-weight: 900;
  letter-spacing: -0.22rem;
  transform: rotate(90deg);
  width: 1.1rem;
}
.toolbox-scratchpad-close {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  margin-right: 0.35rem;
  background: transparent;
  color: #102a63;
  box-shadow: none;
  font-size: 1.55rem;
  line-height: 1;
}
.toolbox-scratchpad-warning {
  margin: 0.75rem 0.9rem 0;
  padding: 0.7rem 0.8rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: #fff7d6;
  color: #854d0e;
  border: 1px solid #f6cf65;
  font-size: 0.9rem;
  line-height: 1.35;
}
.toolbox-scratchpad-warning strong {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fbbf24;
  color: #ffffff;
}
.toolbox-scratchpad-window textarea {
  width: auto;
  min-height: 0;
  margin: 0.75rem 0.9rem;
  border-radius: 2px;
  resize: none;
  line-height: 1.5;
}
.toolbox-scratchpad-footer {
  min-height: 3.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.8rem 0.7rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.toolbox-scratchpad-save-status {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  color: #64748b;
  font-size: 0.82rem;
}
.toolbox-scratchpad-save-status.error { color: #b42318; }
.toolbox-scratchpad-save-status.pending,
.toolbox-scratchpad-save-status.saving { color: #b54708; }
.toolbox-scratchpad-actions {
  display: flex;
  gap: 0.45rem;
}
.toolbox-scratchpad-icon-button {
  width: 2.45rem;
  height: 2.45rem;
  padding: 0.55rem;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #e2e8f0;
  color: #172033;
  box-shadow: none;
}
.toolbox-scratchpad-icon-button.danger {
  background: #fee4e2;
  color: #b42318;
}
body.scratchpad-dragging {
  user-select: none;
  cursor: move;
}
@media (max-width: 719px) {
  .toolbox-scratchpad-window {
    left: 16px !important;
    top: 76px !important;
    width: calc(100vw - 32px);
    height: min(520px, calc(100vh - 92px));
    min-width: 0;
  }
  .toolbox-scratchpad-drag-handle { cursor: default; }
}
