/**
 * Quick Notes Styles
 */

.quick-notes-panel {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    max-height: 80vh;
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-primary);
    z-index: 999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-50%) translateX(20px);
    transition: all 0.3s ease;
}

.quick-notes-panel.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.quick-notes-panel.minimized {
    width: 60px;
    height: 60px;
    top: auto;
    bottom: 100px;
    transform: none;
    overflow: hidden;
}

.quick-notes-panel.minimized .notes-header h3,
.quick-notes-panel.minimized .notes-toolbar,
.quick-notes-panel.minimized .notes-input-container,
.quick-notes-panel.minimized .notes-suggestions,
.quick-notes-panel.minimized .notes-list {
    display: none;
}

.quick-notes-panel.minimized .notes-minimize svg {
    transform: rotate(180deg);
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
}

.notes-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.notes-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-secondary);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--text-secondary);
}

.notes-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
}

.note-quick-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.note-quick-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.note-quick-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.notes-input-container {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-primary);
}

.notes-input {
    width: 100%;
    min-height: 60px;
    max-height: 120px;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
    resize: none;
    transition: all 0.2s ease;
}

.notes-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--bg-primary);
}

.notes-input::placeholder {
    color: var(--text-tertiary);
}

.btn-add-note {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-add-note:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.shortcut-hint {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

.notes-suggestions {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
}

.suggestions-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.suggestions-header svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.suggestion-item svg {
    width: 14px;
    height: 14px;
    fill: #FFB800;
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.notes-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.notes-empty svg {
    width: 48px;
    height: 48px;
    fill: var(--text-tertiary);
    margin-bottom: 1rem;
}

.notes-empty p {
    color: var(--text-tertiary);
    font-size: 0.95rem;
    margin: 0;
}

.note-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.note-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.note-item.deleting {
    opacity: 0;
    transform: translateX(20px);
}

.note-item.note-type-action {
    border-left: 3px solid #10B981;
}

.note-item.note-type-decision {
    border-left: 3px solid #FFB800;
}

.note-item.note-type-important {
    border-left: 3px solid #EF4444;
}

.note-item.note-type-followup {
    border-left: 3px solid #3B82F6;
}

.note-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.note-type-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.note-type-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--text-secondary);
}

.note-type-action .note-type-icon svg {
    fill: #10B981;
}

.note-type-decision .note-type-icon svg {
    fill: #FFB800;
}

.note-type-important .note-type-icon svg {
    fill: #EF4444;
}

.note-type-followup .note-type-icon svg {
    fill: #3B82F6;
}

.note-metadata {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.note-time {
    font-weight: 600;
    color: var(--text-secondary);
}

.note-timestamp::before {
    content: '•';
    margin-right: 0.5rem;
}

.note-delete {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.note-item:hover .note-delete {
    opacity: 1;
}

.note-content {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.5;
    word-break: break-word;
}

/* Scrollbar styling */
.notes-list::-webkit-scrollbar {
    width: 6px;
}

.notes-list::-webkit-scrollbar-track {
    background: transparent;
}

.notes-list::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 3px;
}

.notes-list::-webkit-scrollbar-thumb:hover {
    background: var(--border-secondary);
}

/* Dark theme adjustments */
[data-theme="dark"] .quick-notes-panel {
    background: #1a1a1a;
}

[data-theme="dark"] .notes-input {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .notes-input:focus {
    background: #333;
}

[data-theme="dark"] .note-quick-btn {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .note-quick-btn:hover {
    background: #333;
}

[data-theme="dark"] .notes-suggestions {
    background: #222;
}

[data-theme="dark"] .suggestion-item {
    background: #1a1a1a;
    border-color: #444;
}

[data-theme="dark"] .suggestion-item:hover {
    background: #333;
}

[data-theme="dark"] .note-item {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .btn-icon:hover {
    background: #333;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .quick-notes-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 60vh;
        top: auto;
        bottom: 80px;
        transform: none;
    }
    
    .quick-notes-panel.visible {
        transform: none;
    }
    
    .notes-toolbar {
        flex-wrap: wrap;
    }
    
    .note-quick-btn {
        min-width: calc(50% - 0.25rem);
    }
}