/* MechaPaint web export: the Notes (js/mp_notes.js). Colors follow the app's
   note window (NoteWindow.cs) and arrow (NotesPointerLayer.cs). */

#mp-notes-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

#mp-notes-arrows {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.mp-note-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 140px;
  min-height: 70px;
  background: #222323;
  border: 1px solid rgba(8, 10, 13, 0.9);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  z-index: 10;
}

.mp-note-head {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 5px 6px 5px 8px;
  background: rgba(12, 12, 15, 0.72);
  color: #e6e9ef;
  border-radius: 5px 5px 0 0;
  cursor: move;
  touch-action: none;
}

.mp-note-title {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mp-note-close {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  color: #e6e9ef;
  background: rgba(32, 35, 43, 0.9);
  border: 1px solid #434957;
  border-radius: 4px;
  cursor: pointer;
}

.mp-note-close:hover {
  border-color: #8a93a8;
}

.mp-note-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 8px 10px 10px 10px;
  color: #e6e9ef;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
  -webkit-user-select: text;
  user-select: text;
}

.mp-note-num {
  display: inline-block;
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  border: 1px solid #8a93a8;
  border-radius: 9px;
}

.mp-note-pin {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #e6e9ef;
  background: rgba(15, 18, 22, 0.94);
  border: 1px solid rgba(8, 10, 13, 0.9);
  border-radius: 13px;
  box-shadow: 0 0 0 2px rgba(131, 218, 128, 0.55), 0 2px 6px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  pointer-events: auto;
}

.mp-note-pin:hover {
  box-shadow: 0 0 0 2px #83da80, 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* CLEAN VIEW (11-14g): the only notes thing on screen until it is clicked. */
#mp-notes-icon {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  color: #dbe0ed;
  background: rgba(21, 23, 28, 0.78);
  border: 1px solid #434957;
  border-radius: 6px;
  cursor: pointer;
}

#mp-notes-icon:hover {
  border-color: #83da80;
  color: #ffffff;
}

.mp-notes-icon-count {
  min-width: 18px;
  padding: 0 5px;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  color: #0d0d0f;
  background: #83da80;
  border-radius: 9px;
}

.mp-notes-panel-tools {
  display: flex;
  gap: 6px;
}

.mp-notes-panel-head button.mp-notes-min {
  width: 26px;
  padding: 2px 0 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

#mp-notes-panel {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 260px;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 80px);
  display: flex;
  flex-direction: column;
  background: rgba(21, 23, 28, 0.92);
  border: 1px solid #343944;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.mp-notes-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #343944;
}

.mp-notes-panel-title {
  font-size: 13px;
  letter-spacing: 0.04em;
}

.mp-notes-panel-head button {
  font: inherit;
  font-size: 11px;
  color: #dbe0ed;
  background: rgba(32, 35, 43, 0.85);
  border: 1px solid #434957;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
}

.mp-notes-panel-head button.mp-on {
  border-color: #34e068;
  color: #34e068;
}

.mp-notes-list {
  overflow-y: auto;
  padding: 4px;
}

.mp-notes-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  font: inherit;
  text-align: left;
  color: #dbe0ed;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}

.mp-notes-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mp-notes-row.mp-on {
  border-color: #434957;
}

.mp-notes-row-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mp-notes-row-title {
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mp-notes-row-peek {
  font-size: 11px;
  color: #9ea6b8;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* The page's own controls stay above any note card. */
#mp-buttons,
#mp-title,
#mp-notes-icon,
#mp-message {
  z-index: 1001;
}
