/* Notepad Styles */
.notepad-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.notepad-menubar {
    display: flex;
    background: var(--window-bg);
    height: 20px;
    align-items: center;
    font-size: 12px;
    padding-left: 2px;
    user-select: none;
    flex-shrink: 0;
    color: var(--text-color);
}

.np-menu-item {
    padding: 0 8px;
    height: 100%;
    display: flex;
    align-items: center;
    cursor: default;
    position: relative;
    color: var(--text-color);
}

.np-menu-item:hover {
    background: var(--selection-color);
}

.np-menu-item.open {
    background: var(--selection-color);
}

/* Dropdown */
.np-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--ctx-menu-bg);
    border: 1px solid var(--ctx-menu-border);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    min-width: 180px;
    z-index: 2000; /* Above everything */
    flex-direction: column;
    padding: 2px 0;
    color: var(--text-color);
}

.np-menu-item.open .np-dropdown {
    display: flex;
}

.np-dd-item {
    padding: 5px 25px 5px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-color);
    position: relative;
}

.np-dd-item:hover {
    background: var(--selection-color);
}

.np-dd-sep {
    height: 1px;
    background: #d9d9d9;
    margin: 3px 10px;
}

.np-dd-shortcut {
    color: #666;
    margin-left: 20px;
}

.notepad-toolbar {
    height: 28px;
    background: var(--app-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 5px;
    gap: 2px;
    flex-shrink: 0;
}

.np-btn {
    min-width: 28px;
    height: 24px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--font-stack);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    color: var(--text-color);
}

.np-btn:hover {
    background: var(--hover-bg);
    border-color: var(--border-color);
}

.np-btn:active {
    background: var(--active-bg);
    border-color: var(--win-blue);
}

.np-sep {
    width: 1px;
    height: 16px;
    background: var(--border-color);
    margin: 0 4px;
}

.notepad-find-bar {
    background: var(--app-bg);
    padding: 4px 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 5px;
    animation: slideDown 0.2s ease-out;
}

.notepad-find-bar.hidden {
    display: none;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.find-input {
    flex: 1;
    height: 24px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--input-text);
    padding: 0 5px;
    font-size: 0.85rem;
}

.notepad-editor {
    flex: 1;
    width: 100%;
    border: none;
    padding: 10px;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    outline: none;
    background: var(--input-bg);
    color: var(--text-color);
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}