/* --- Sticky Note Tool Styles --- */

/* Make sticky note icon fully visible when hovered */
.sticky-note-icon:hover {
  opacity: 1 !important;
}

/* Sticky notes wrapper (stacked column on page) */
/* Apply a gradient mask to fade out towards the bottom */
#sticky-notes-wrapper {
  /* Bottom fade only */
  mask-image: linear-gradient(to bottom, 
                              rgba(0,0,0,1) 0%, 
                              rgba(0,0,0,1) 90%, 
                              rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, 
                                      rgba(0,0,0,1) 0%, 
                                      rgba(0,0,0,1) 90%, 
                                      rgba(0,0,0,0) 100%);
}

#sticky-notes-wrapper.fade-top {
  /* Fade at top and bottom */
  mask-image: linear-gradient(to bottom, 
                              rgba(0,0,0,0) 0%, 
                              rgba(0,0,0,1) 10%, 
                              rgba(0,0,0,1) 90%, 
                              rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, 
                                      rgba(0,0,0,0) 0%, 
                                      rgba(0,0,0,1) 10%, 
                                      rgba(0,0,0,1) 90%, 
                                      rgba(0,0,0,0) 100%);
}

/* Remove bottom fade when .no-bottom-fade is present with .fade-top */
#sticky-notes-wrapper.fade-top.no-bottom-fade {
  mask-image: linear-gradient(to bottom,
                              rgba(0,0,0,0) 0%,
                              rgba(0,0,0,1) 10%,
                              rgba(0,0,0,1) 100%);
  -webkit-mask-image: linear-gradient(to bottom,
                                      rgba(0,0,0,0) 0%,
                                      rgba(0,0,0,1) 10%,
                                      rgba(0,0,0,1) 100%);
}

#sticky-notes-wrapper {
  position: fixed; /* Fix position on screen */
  top: 100px;
  left: 20px;
  height: calc(100vh - 180px); /* Limit height relative to viewport */
  overflow-y: auto; /* Enable vertical scrolling */
  overflow-x: hidden; /* Prevent horizontal scrolling */
  display: flex;
  flex-direction: column;
  gap: 16px; /* Space between notes */
  z-index: 10001;
  transition: opacity 0.3s ease, transform 0.3s ease; /* Smooth transitions */
}

/* Toggle "Show/Hide Stacked Notes" button */
.toggle-stacked-btn {
  position: fixed;
  bottom: 15px;  /* moved from top to bottom */
  left: 20px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  z-index: 10000;
  cursor: pointer;
  display: none; /* Hidden by default */
}

/* Individual sticky note style */
.sticky-note {
  position: relative;
  background: hsl(var, 100%, 85%);
  color: #000000;
  padding: 10px;
  border: 1px solid hsl(var, 100%, 70%);
  border-radius: 16px;
  font-size: 16px; /* or user-selected */
  max-width: 260px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 10001;
  cursor: pointer; /* Indicate draggable */
  font-family: 'Avenir Next', sans-serif; /* or user-selected */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box; /* Include padding/border in size */
}

/* Timestamp (hidden by default) */
.sticky-note .timestamp {
  font-size: 12px;
  margin-top: 6px;
  color: #000000;
  opacity: 0.6;
  display: none; /* hidden by default */
}

/* Note text formatting */
.sticky-note .note-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Note buttons container (hidden by default) */
.sticky-note .note-buttons {
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
}

/* Action bar styling inside sticky note */
.sticky-note .action-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 10px;
  background: rgba(246, 247, 250, 0.5);
  border-radius: 12px;
  margin-top: 10px;
  width: max-content;
  font-size: 0;
}

/* Sticky note icon styling */
.sticky-note-icon {
  width: 18px;
  height: 18px;
  cursor: pointer;
  opacity: 0.5; /* Semi-transparent by default */
  filter: brightness(100%);
  color: inherit;
  position: relative;
  left: 0;
  transition: transform 0.2s ease-in-out;
  font-size: 16px;
}

/* Scale icon on hover */
.sticky-note-icon:hover {
  transform: scale(1.15);
}

/* Delete icon hover color */
.sticky-note-icon.delete:hover svg {
  stroke: #D71921; /* Red stroke for delete */
}

/* Tooltip shown when text is copied */
.sticky-note .copied-tooltip {
  position: absolute;
  bottom: 28px;
  left: 0;
  background: #1f1f1f;
  color: #ffffff;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 10020;
  opacity: 0; /* Hidden by default */
  transition: opacity 0.2s ease;
}

/* Bubbled style for condensed sticky note */
.sticky-note.bubbled {
  width: 60px !important;
  height: 60px !important;
  border-radius: 30px !important;
  overflow: hidden !important;
}

/* Hide scrollbar in WebKit browsers */
#sticky-notes-wrapper::-webkit-scrollbar {
  display: none;
}

/* Note buttons container (hidden by default) */
.note-buttons {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Show note buttons on sticky note hover */
.sticky-note:hover .note-buttons {
  opacity: 1;
}

/* Timestamp for sticky note (used in JS as .note-timestamp) */
.sticky-note .note-timestamp {
  font-size: 12px;
  margin-top: 6px;
  color: #000000;
  opacity: 0.6;
  display: none;
}

/* Tooltip for copy-to-clipboard feedback (used in JS as .copy-tooltip) */
.copy-tooltip {
  position: absolute;
  bottom: 28px;
  left: 0;
  background: #1f1f1f;
  color: #ffffff;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 10020;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.copy-tooltip.visible {
  opacity: 1;
}
.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Container holding the tags inside a note */
.note-tags {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Individual tag badge style */
.tag-badge {
  background-color: #2976ff;  /* Bootstrap primary blue */
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  user-select: none;
  cursor: default;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

/* Tag badge hover effect (optional) */
.tag-badge:hover {
  background-color: #2976ff;
}

/* Tag input field style */
.tag-input {
  margin-top: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
  transition: border-color 0.3s ease;
}

/* Tag input focus style */
.tag-input:focus {
  border-color: #2976ff;
  box-shadow: 0 0 5px rgba(41,118,255,0.5);
}

/* Tag suggestions dropdown styling */
.tag-suggestions {
  font-family: 'Avenir Next', sans-serif;
  color: #333;
  user-select: none;
  max-height: 150px;
  overflow-y: auto;
  border-radius: 8px;
  box-sizing: border-box;
  background-color: #fff;
  border: 1px solid #ccc;
  cursor: pointer;
  position: absolute;
  z-index: 10000;
  padding: 4px 0;
  min-width: 150px;
  font-size: 14px;
}

.tag-suggestions div {
  padding: 6px 12px;
  white-space: nowrap;
}

.tag-suggestions div:hover {
  background-color: #eee;
}



