/* dom-sticky-note.css - Using Theme Variables */

.dom-sticky-notes-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 75;
    overflow: hidden;
}

.dom-sticky-note {
    position: absolute;
    pointer-events: auto;
    background-color: var(--sticky-yellow);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-xs);
    display: flex;
    flex-direction: column;
    user-select: none;
    transition: box-shadow var(--transition-fast);
}

.dom-sticky-note:hover {
    box-shadow: var(--shadow-lg);
}

.dom-sticky-note.selected {
    box-shadow: 0 0 0 2px var(--accent), var(--shadow-lg);
}

.dom-sticky-note.dragging {
    opacity: 0.9;
    cursor: grabbing !important;
    z-index: 1000;
}

.dom-sticky-note.resizing {
    opacity: 0.9;
}

/* Content area - not editable by default, can drag */
.sticky-note-content {
    flex: 1;
    padding: 10px 12px;
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.4;
    color: #333;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    outline: none;
    cursor: grab;
    user-select: none;
}

/* When editing */
.dom-sticky-note.editing .sticky-note-content {
    cursor: text;
    user-select: text;
}

.sticky-note-content:focus {
    background: rgba(255, 255, 255, 0.2);
}

.sticky-note-content:empty::before {
    content: 'Double-click to edit...';
    color: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

/* Resize handle */
.sticky-note-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.15) 50%);
    border-radius: 0 0 var(--radius-xs) 0;
}

.sticky-note-resize-handle:hover {
    background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.25) 50%);
}

/* Context menu styles */
.sticky-note-context-menu {
    min-width: 160px;
}

.sticky-note-context-menu .color-picker-item {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 8px;
}

.sticky-note-context-menu .color-picker-item span {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.sticky-note-context-menu .color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 4px;
}

.sticky-note-context-menu .color-swatch {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-fast);
}

.sticky-note-context-menu .color-swatch:hover {
    transform: scale(1.15);
    border-color: rgba(0, 0, 0, 0.4);
}

/* Scrollbar styling for content */
.sticky-note-content::-webkit-scrollbar {
    width: 6px;
}

.sticky-note-content::-webkit-scrollbar-track {
    background: transparent;
}

.sticky-note-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-xs);
}

.sticky-note-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Sticky note color variations - these use their own colors since they're meant to look like real sticky notes */
.dom-sticky-note.color-yellow { background-color: var(--sticky-yellow); }
.dom-sticky-note.color-orange { background-color: var(--sticky-orange); }
.dom-sticky-note.color-red { background-color: var(--sticky-red); }
.dom-sticky-note.color-pink { background-color: var(--sticky-pink); }
.dom-sticky-note.color-purple { background-color: var(--sticky-purple); }
.dom-sticky-note.color-indigo { background-color: var(--sticky-indigo); }
.dom-sticky-note.color-blue { background-color: var(--sticky-blue); }
.dom-sticky-note.color-cyan { background-color: var(--sticky-cyan); }
.dom-sticky-note.color-green { background-color: var(--sticky-green); }
.dom-sticky-note.color-lime { background-color: var(--sticky-lime); }

/* Color swatches in menus/toolbar - use same variables */
.color-swatch.swatch-yellow { background-color: var(--sticky-yellow); }
.color-swatch.swatch-orange { background-color: var(--sticky-orange); }
.color-swatch.swatch-red { background-color: var(--sticky-red); }
.color-swatch.swatch-pink { background-color: var(--sticky-pink); }
.color-swatch.swatch-purple { background-color: var(--sticky-purple); }
.color-swatch.swatch-indigo { background-color: var(--sticky-indigo); }
.color-swatch.swatch-blue { background-color: var(--sticky-blue); }
.color-swatch.swatch-cyan { background-color: var(--sticky-cyan); }
.color-swatch.swatch-green { background-color: var(--sticky-green); }
.color-swatch.swatch-lime { background-color: var(--sticky-lime); }

/* Text Editor Toolbar */
.sticky-note-toolbar {
    position: fixed;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    background: rgba(40, 40, 50, 0.95);
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    flex-wrap: nowrap;
}

.toolbar-select {
    height: 26px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

.toolbar-select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.toolbar-select option {
    background: #333;
    color: #fff;
}

.toolbar-separator {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 3px;
}

.toolbar-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.toolbar-btn.active {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toolbar-color-wrapper,
.toolbar-emoji-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toolbar-color-palette,
.toolbar-emoji-palette {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    padding: 6px;
    background: rgba(40, 40, 50, 0.98);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 130px;
}

.toolbar-emoji-palette {
    width: 180px;
}

.color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.1s;
}

.color-swatch:hover {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.emoji-btn {
    font-size: 18px;
    padding: 2px 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s;
}

.emoji-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}