/* ===== post_it_notes: overlay a pantalla completa ===== */
[data-id="post_it_notes.notes_window"] .md-floatingwindow__window {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0;
  background: transparent;
}

[data-id="post_it_notes.notes_window"] .md-floatingwindow__titlebar {
  background: color-mix(in srgb, var(--md-color-surface) 60%, transparent);
}

.postit-toolbar {
  background: color-mix(in srgb, var(--md-color-surface) 60%, transparent);
}

[data-id="post_it_notes.notes_window"] .md-floatingwindow__backdrop {
  background: rgba(0, 0, 0, 0.6);
}

[data-id="post_it_notes.notes_window"] .md-floatingwindow__content {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ===== Tablero ===== */
.postit-board {
  position: relative;
  overflow: hidden;
  background-color: color-mix(in srgb, var(--md-color-surface) 60%, transparent);
  background-image: radial-gradient(rgba(128, 128, 128, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  touch-action: none;
}

.postit-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--md-color-on-surface-variant);
  pointer-events: none;
  width: min(280px, 80vw);
}

.postit-empty h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--md-color-on-surface);
}

.postit-empty p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* ===== Nota ===== */
.postit-note {
  position: absolute;
  min-width: 130px;
  min-height: 110px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  cursor: grab;
  touch-action: none;
}

.postit-note.postit-dragging {
  cursor: grabbing;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 16px 32px rgba(0, 0, 0, 0.22);
  z-index: 9999 !important;
}

.postit-note-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 8px 0;
  height: 26px;
  flex-shrink: 0;
}

.postit-note-controls {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.postit-note:hover .postit-note-controls,
.postit-note.postit-active .postit-note-controls {
  opacity: 1;
}

.postit-note-controls button {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.55);
  padding: 0;
  touch-action: manipulation;
}

.postit-note-controls button:hover {
  background: rgba(0, 0, 0, 0.18);
}

.postit-note-controls svg {
  width: 10px;
  height: 10px;
}

.postit-note textarea {
  flex: 1;
  width: 100%;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.78);
  padding: 2px 14px 14px;
  cursor: text;
}

.postit-note textarea::placeholder {
  color: rgba(0, 0, 0, 0.32);
}

.postit-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 10px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.postit-note:hover .postit-swatches,
.postit-note.postit-active .postit-swatches {
  opacity: 1;
}

.postit-swatches .postit-swatch {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

.postit-resize-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.postit-note:hover .postit-resize-handle,
.postit-note.postit-active .postit-resize-handle {
  opacity: 0.4;
}

.postit-resize-handle svg {
  width: 100%;
  height: 100%;
}
