/* Simple Note Tool Styles */

.note-app {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: var(--card-bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Sidebar Styles */
.note-sidebar {
    background: var(--main-bg-color);
    border-right: 1px solid var(--subtle-border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--subtle-border-color);
}

.new-note-btn {
    width: 100%;
    padding: 12px 16px;
    background: var(--highlight-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.new-note-btn:hover {
    background: var(--highlight-color);
    opacity: 0.9;
    transform: translateY(-1px);
}

.new-note-btn svg {
    width: 16px;
    height: 16px;
}

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

.note-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: var(--card-bg-color);
    border: 1px solid var(--subtle-border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.note-item:hover {
    background: var(--highlight-color);
    background-opacity: 0.1;
    border-color: var(--highlight-color);
}

.note-item.active {
    background: var(--highlight-color);
    color: white;
    border-color: var(--highlight-color);
}

.note-item-title {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item-preview {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item.active .note-item-preview {
    color: white;
    opacity: 0.8;
}

.note-item-date {
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.6;
    margin-top: 4px;
}

.note-item.active .note-item-date {
    color: white;
    opacity: 0.7;
}

/* Editor Styles */
.note-editor {
    display: flex;
    flex-direction: column;
    background: var(--card-bg-color);
}

.editor-header {
    padding: 20px;
    border-bottom: 1px solid var(--subtle-border-color);
    display: flex;
    align-items: center;
    gap: 16px;
}

.note-title {
    flex: 1;
    padding: 12px 16px;
    background: var(--main-bg-color);
    border: 1px solid var(--subtle-border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
}

.note-title:focus {
    outline: none;
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.save-btn,
.delete-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.save-btn {
    background: var(--highlight-color);
    color: white;
}

.save-btn:hover {
    background: var(--highlight-color);
    opacity: 0.9;
    transform: translateY(-1px);
}

.delete-btn {
    background: #ef4444;
    color: white;
}

.delete-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.save-btn svg,
.delete-btn svg {
    width: 14px;
    height: 14px;
}

.editor-content {
    flex: 1;
    padding: 20px;
}

.note-content {
    width: 100%;
    height: 100%;
    min-height: 400px;
    padding: 16px;
    background: var(--main-bg-color);
    border: 1px solid var(--subtle-border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.note-content:focus {
    outline: none;
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.editor-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--subtle-border-color);
    background: var(--main-bg-color);
}

.note-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.7;
}

.word-count {
    font-weight: 500;
}

.last-saved {
    font-style: italic;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-color);
    opacity: 0.6;
    text-align: center;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 500;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .note-app {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .note-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--subtle-border-color);
        max-height: 200px;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .editor-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .note-app {
        height: calc(100vh - 160px);
    }
    
    .sidebar-header,
    .editor-header,
    .editor-content,
    .editor-footer {
        padding: 16px;
    }
    
    .note-title {
        font-size: 14px;
    }
    
    .note-content {
        min-height: 300px;
        font-size: 13px;
    }
}