/* Board and Fullscreen Styles - Minimal CSS for dynamic states */

/* Board fullscreen mode (overlay within the page, not browser fullscreen) */
.board-fullscreen {
  overflow: hidden !important;
}

.board-fullscreen .navbar,
.board-fullscreen header,
.board-fullscreen nav {
  display: none !important;
}

.board-fullscreen main {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background-color: #f5f5f5;
  z-index: 9990 !important;
}

.board-fullscreen .flex.flex-col.w-full.h-full {
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
}

.board-fullscreen #board-container,
.board-fullscreen .board-container {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
}

.board-fullscreen .floating-menu {
  z-index: 9999 !important;
  position: fixed !important;
}

.board-fullscreen .embedded-priorities {
  z-index: 9998 !important;
}

.board-fullscreen .sticky-note {
  position: absolute;
}

.board-fullscreen .flex-none {
  display: none !important;
}

/* Show logo only in fullscreen mode and only on tablet+ sizes */
.board-fullscreen .fullscreen-logo {
  display: block;
}

@media (min-width: 768px) {
  .board-fullscreen .fullscreen-logo {
    display: block;
  }
}

/* Double-click hint */
.board-container::before {
  content: "Double-click to create a note";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 24px;
  background-color: rgba(0, 0, 0, 0.05);
  border: 1px dashed rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 1;
}

.board-container:not(:has(.sticky-note))::before {
  opacity: 1;
}

.board-container:hover::before {
  opacity: 0;
}

@media (prefers-color-scheme: dark) {
  .board-container::before {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
  }
}

/* Embedded priorities dragging state */
#embedded-priorities.dragging {
  transform: rotate(2deg);
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px mediumpurple;
  z-index: 1000 !important;
  cursor: grabbing !important;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out;
}

@media (prefers-color-scheme: dark) {
  #embedded-priorities.dragging {
    box-shadow:
      0 0 0 2px var(--color-foreground),
      0 0 0 4px mediumpurple;
  }
}

#embedded-priorities:focus {
  outline: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px mediumpurple;
}

@media (prefers-color-scheme: dark) {
  #embedded-priorities:focus {
    box-shadow:
      0 0 0 2px var(--color-foreground),
      0 0 0 4px mediumpurple;
  }
}

/* Multi-note selection dynamic states */
.sticky-note.selected {
  outline: 3px solid mediumpurple;
  outline-offset: 2px;
  box-shadow: 0 0 20px rgba(147, 112, 219, 0.4);
  z-index: 100 !important;
}

.sticky-note.selected.multi-dragging {
  opacity: 0.9;
}

@media (prefers-color-scheme: dark) {
  .sticky-note.selected {
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.6);
  }
}

/* Crosshair cursor during selection mode */
.board-container.selecting {
  cursor: crosshair !important;
}

.board-container.selecting * {
  cursor: crosshair !important;
}

/* Animated blob keyframes - different shapes for each action */
@keyframes blob-morph-complete {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  50% {
    border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
  }
  75% {
    border-radius: 60% 40% 60% 50% / 60% 50% 40% 30%;
  }
}

@keyframes blob-morph-archive {
  0%, 100% {
    border-radius: 40% 60% 70% 30% / 50% 70% 30% 50%;
  }
  25% {
    border-radius: 70% 30% 50% 50% / 60% 40% 60% 40%;
  }
  50% {
    border-radius: 30% 70% 40% 60% / 40% 50% 60% 50%;
  }
  75% {
    border-radius: 50% 50% 30% 70% / 70% 30% 50% 50%;
  }
}

@keyframes blob-morph-delete {
  0%, 100% {
    border-radius: 70% 30% 50% 50% / 40% 60% 40% 60%;
  }
  25% {
    border-radius: 40% 60% 40% 60% / 70% 30% 70% 30%;
  }
  50% {
    border-radius: 60% 40% 60% 40% / 50% 50% 50% 50%;
  }
  75% {
    border-radius: 30% 70% 30% 70% / 60% 40% 60% 40%;
  }
}

@keyframes blob-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(2px, -3px) scale(1.02);
  }
  66% {
    transform: translate(-2px, 2px) scale(0.98);
  }
}

/* Floating action zones for note state management */
.action-zone {
  position: relative;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none !important;
  outline: none !important;
}

/* Solid color backgrounds for action zones */
.action-zone[data-action-type="complete"] {
  background: #22c55e;
}

.action-zone[data-action-type="archive"] {
  background: #3b82f6;
}

.action-zone[data-action-type="delete"] {
  background: #ef4444;
}

/* Blob background - animated abstract shape (behind the main circle) */
.action-zone::before {
  content: '';
  position: absolute;
  inset: -8px;
  opacity: 1;
  z-index: -1;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Color-specific blob backgrounds with unique animations */
.action-zone[data-action-type="complete"]::before {
  background: #22c55e;
  animation: blob-morph-complete 8s ease-in-out infinite, blob-float 6s ease-in-out infinite;
}

.action-zone[data-action-type="archive"]::before {
  background: #3b82f6;
  animation: blob-morph-archive 9s ease-in-out infinite, blob-float 7s ease-in-out infinite 0.5s;
}

.action-zone[data-action-type="delete"]::before {
  background: #ef4444;
  animation: blob-morph-delete 7s ease-in-out infinite, blob-float 5s ease-in-out infinite 1s;
}

/* When notes are dragged over - transform to circle */
.action-zone.drag-over {
  transform: scale(2.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.action-zone.drag-over::before {
  border-radius: 50%;
  opacity: 0.5;
  inset: -20px;
  animation: blob-float 2s ease-in-out infinite;
}

.action-zone:hover:not(.drag-over) {
  transform: scale(1.1);
  filter: brightness(1.1);
}

.action-zone svg {
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}

.action-zone.drag-over svg {
  transform: scale(1.5);
}

/* Action zone tooltip */
.action-zone-tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.action-zone-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

.action-zone.drag-over .action-zone-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Floating actions area animation */
.floating-actions-area {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Note shrinking effect when over action zone */
.sticky-note.shrinking-to-action {
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.35s ease-out,
    left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    top 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.01) rotate(360deg);
  opacity: 0.2;
  pointer-events: none;
  z-index: 10000 !important;
}

/* Prevent shrinking animation during multi-drag */
.sticky-note.multi-dragging.shrinking-to-action {
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.35s ease-out,
    left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    top 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.01) rotate(360deg);
  opacity: 0.2;
  z-index: 10000 !important;
}

/* Visual state indicators for notes */
.sticky-note[data-note-state-value="completed"] {
  opacity: 0.8;
  border-left: 4px solid #22c55e;
}

.sticky-note[data-note-state-value="archived"] {
  opacity: 0.7;
  border-left: 4px solid #3b82f6;
  filter: grayscale(20%);
}

.sticky-note[data-note-state-value="completed"]:hover,
.sticky-note[data-note-state-value="archived"]:hover {
  opacity: 1;
  filter: grayscale(0%);
}

@media (prefers-color-scheme: dark) {
  .sticky-note[data-note-state-value="completed"] {
    border-left-color: #4ade80;
  }

  .sticky-note[data-note-state-value="archived"] {
    border-left-color: #60a5fa;
  }
}

/* Notes being dragged should appear on top of everything */
.sticky-note.dragging {
  z-index: 1000 !important;
  cursor: grabbing !important;
}

/* Base transform for smooth transitions */
.sticky-note {
  transform: scale(1) rotate(0deg);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
