/* Phase 6 split from frontend/static/app.css */
/* Section: foldermanager */

/* ---------- Folder Manager ---------- */
.fm-toolbar,
.fm-product-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.fm-action-group {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.fm-action-group:last-child {
    margin-bottom: 0;
}

.fm-action-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}

.fm-path-input {
    flex: 1;
    min-width: 280px;
    background: var(--bg-deep);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.fm-path-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.fm-entry-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
}

.fm-entry {
    width: 100%;
    border: 1px solid var(--border-subtle);
    background: rgba(7, 20, 38, 0.5);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.fm-entry:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
}

.fm-entry.is-dir {
    cursor: pointer;
}

.fm-entry.is-file {
    cursor: default;
}

.fm-entry.is-file:hover {
    border-color: var(--border-subtle);
    background: rgba(7, 20, 38, 0.5);
    transform: none;
}

.fm-entry.is-selected {
    border-color: rgba(255, 216, 77, 0.55);
    background: rgba(255, 216, 77, 0.12);
}

.fm-entry-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.fm-entry-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.fm-entry-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-entry-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.fm-entry-action {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-cyan);
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    flex-shrink: 0;
}

.fm-entry-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fm-entry-btn {
    min-width: 72px;
    justify-content: center;
}

@media (max-width: 900px) {
    .fm-path-input {
        min-width: 100%;
    }

    .fm-toolbar .btn,
    .fm-product-row .btn {
        width: 100%;
    }

    .fm-entry {
        flex-wrap: wrap;
    }

    .fm-entry-action {
        margin-left: auto;
    }

    .fm-entry-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .fm-entry-controls .btn {
        width: auto;
    }
}
