/* Bloco de notas: janelas flutuantes (.note-window). Cor da nota = classe note-color-*
   (blue→cat-4, green→cat-3, yellow→cat-7, pink→cat-1, purple→cat-5). */

.note-window {
  --note-color: var(--rb-cat-4);
  position: fixed;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  width: 280px;
  max-width: 80vw;
  overflow: hidden;
  border: 1px solid var(--rb-border-strong);
  border-radius: var(--rb-radius-lg);
  background: var(--rb-surface);
  box-shadow: var(--rb-shadow-lg);
  font-size: var(--rb-fs-sm);
}

.note-window.note-color-blue   { --note-color: var(--rb-cat-4); }
.note-window.note-color-green  { --note-color: var(--rb-cat-3); }
.note-window.note-color-yellow { --note-color: var(--rb-cat-7); }
.note-window.note-color-pink   { --note-color: var(--rb-cat-1); }
.note-window.note-color-purple { --note-color: var(--rb-cat-5); }

.note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 10px;
  background: var(--note-color);
  color: var(--rb-on-solid);
  cursor: move;
}

.note-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--rb-fs-sm);
  font-weight: var(--rb-fw-semibold);
}

.note-title i { font-size: var(--rb-fs-base); }

.note-title-input {
  max-width: 120px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: var(--rb-fs-sm);
  font-weight: var(--rb-fw-semibold);
  color: inherit;
}

.note-title-input::placeholder {
  color: inherit;
  opacity: .7;
}

.note-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.note-color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid var(--rb-on-solid);
  border-radius: var(--rb-radius-pill);
  background: var(--rb-cat-4);
  cursor: pointer;
}

.note-color-dot:hover { border-width: 2px; }

.note-color-dot[data-color="blue"]   { background: var(--rb-cat-4); }
.note-color-dot[data-color="green"]  { background: var(--rb-cat-3); }
.note-color-dot[data-color="yellow"] { background: var(--rb-cat-7); }
.note-color-dot[data-color="pink"]   { background: var(--rb-cat-1); }
.note-color-dot[data-color="purple"] { background: var(--rb-cat-5); }

.note-minimize-btn,
.note-close-btn {
  padding: 2px 4px;
  border: 0;
  border-radius: var(--rb-radius-sm);
  background: transparent;
  font-size: var(--rb-fs-base);
  line-height: 1;
  color: inherit;
  cursor: pointer;
}

.note-minimize-btn:hover,
.note-close-btn:hover { background: rgba(var(--rb-text-rgb), .18); }

.note-body { padding: 8px 10px; }

.note-textarea {
  width: 100%;
  min-height: 110px;
  max-height: 260px;
  padding: 6px 8px;
  border: 1px solid var(--rb-border-strong);
  border-radius: var(--rb-radius);
  outline: none;
  background: var(--rb-surface-2);
  font-size: var(--rb-fs-sm);
  color: var(--rb-text);
  resize: vertical;
}

.note-textarea::placeholder { color: var(--rb-text-subtle); }

.note-textarea:focus {
  border-color: var(--rb-primary);
  box-shadow: 0 0 0 3px var(--rb-focus-ring);
}

.note-footer {
  display: flex;
  justify-content: flex-end;
  padding: 2px 10px 6px;
}

.note-status {
  font-size: var(--rb-fs-xs);
  color: var(--rb-text-muted);
}

/* Minimizada: encosta no rodapé da tela, só a aba aparece */
.note-window.note-minimized {
  width: 220px;
  max-width: 40vw;
  transform: translateY(calc(100% + 4px));
  transition: transform .2s var(--rb-ease);
}

.note-window.note-minimized:hover { transform: translateY(calc(60% - 4px)); }

.note-window.note-minimized .note-header { cursor: default; }
.note-window.note-minimized .note-body,
.note-window.note-minimized .note-footer,
.note-window.note-minimized .note-color-dot { display: none; }
.note-window.note-minimized .note-title-input { max-width: 110px; }

.note-window.note-minimized.note-intro { animation: noteDockIntro .3s var(--rb-ease) both; }

@keyframes noteDockIntro {
  from { transform: translateY(140%); opacity: 0; }
  to   { transform: translateY(calc(100% + 4px)); opacity: 1; }
}

.note-window.note-anim-in    { animation: noteFadeUp .2s var(--rb-ease) both; }
.note-window.note-anim-close { animation: noteFadeDown .15s var(--rb-ease) both; }

@keyframes noteFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes noteFadeDown {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(8px); }
}
