/* =================================================================
   WF Portal — Canvas Components (property rows, entity blocks, root card)
   ================================================================= */

/* ── Canvas Property Row ──────────────────────────────────────────── */

.wf-canvas-prop {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.5rem;
    font-size: var(--theme-font-size-sm);
    border-radius: var(--theme-radius-button);
    transition: background-color 120ms ease;
}
.wf-canvas-prop:hover {
    background-color: var(--theme-background-hover);
}

.wf-canvas-prop-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hover-reveal actions on canvas property rows */
.wf-canvas-action {
    opacity: 0;
    transition: opacity 120ms ease;
    padding: 0;
    line-height: 1;
    font-size: 0.75rem;
    color: var(--theme-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}
.wf-canvas-prop:hover .wf-canvas-action {
    opacity: 0.6;
}
.wf-canvas-action:hover {
    opacity: 1 !important;
}
.wf-canvas-action.danger:hover {
    color: var(--theme-danger) !important;
}
.wf-canvas-action.edit:hover {
    color: var(--theme-primary) !important;
}

/* ── Root Entity Card ─────────────────────────────────────────────── */

.wf-entity-root-card {
    border: 2px solid var(--theme-primary);
    border-radius: var(--theme-radius);
    background-color: var(--theme-background-raised);
    margin-bottom: 1rem;
}

.wf-entity-root-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--theme-primary-muted) 0%, transparent 100%);
    border-bottom: 1px solid var(--theme-border);
    border-radius: var(--theme-radius) var(--theme-radius) 0 0;
}
.wf-entity-root-title {
    font-size: var(--theme-font-size-base);
    font-weight: 700;
    color: var(--theme-text-emphasis);
}
.wf-entity-root-subtitle {
    font-size: var(--theme-font-size-xs);
    color: var(--theme-text-muted);
    margin-top: 0.1rem;
}

.wf-entity-root-body {
    padding: 0.5rem 0.75rem;
}

.wf-entity-root-drop {
    border: 2px dashed var(--theme-border-subtle);
    border-radius: var(--theme-radius-button);
    padding: 0.4rem 0.5rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-muted);
    font-size: var(--theme-font-size-xs);
    transition: all 150ms ease;
    margin-top: 0.25rem;
}
.wf-entity-root-drop.active {
    border-color: var(--theme-primary);
    background-color: var(--theme-primary-muted);
    color: var(--theme-primary);
}

/* ── Entity Block (child entity card) ─────────────────────────────── */

.wf-entity-block {
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
    background-color: var(--theme-background-raised);
    margin-bottom: 0.5rem;
    min-width: 200px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.wf-entity-block.drop-active {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px var(--theme-primary-muted);
}

.wf-entity-block-single {
    border-left: 3px solid var(--theme-accent);
}
.wf-entity-block-list {
    border-left: 3px solid var(--theme-info);
}

.wf-entity-block-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--theme-border);
    font-size: var(--theme-font-size-sm);
    font-weight: 600;
}
.wf-entity-block-header .wf-canvas-action {
    font-size: 0.7rem;
}
.wf-entity-block-header:hover .wf-canvas-action {
    opacity: 0.6;
}

.wf-entity-block-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wf-list-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.05rem 0.35rem;
    font-size: 0.6rem;
    font-weight: 600;
    border-radius: 999px;
    background-color: var(--theme-info);
    color: var(--theme-text-on-primary);
    white-space: nowrap;
}
.wf-single-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.05rem 0.35rem;
    font-size: 0.6rem;
    font-weight: 600;
    border-radius: 999px;
    background-color: var(--theme-accent);
    color: var(--theme-text-on-accent);
    white-space: nowrap;
}

.wf-entity-block-body {
    padding: 0.35rem 0.5rem;
}

.wf-entity-block-empty {
    font-size: var(--theme-font-size-xs);
    color: var(--theme-text-muted);
    font-style: italic;
    padding: 0.25rem 0;
}

.wf-entity-block-drop {
    border: 1.5px dashed var(--theme-border-subtle);
    border-radius: var(--theme-radius-button);
    padding: 0.25rem;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-muted);
    font-size: 0.65rem;
    margin-top: 0.25rem;
    transition: all 150ms ease;
}
.wf-entity-block-drop.active {
    border-color: var(--theme-primary);
    background-color: var(--theme-primary-muted);
    color: var(--theme-primary);
}

/* ── Group Drop Prompt ────────────────────────────────────────────── */

.wf-group-prompt {
    border: 2px solid var(--theme-primary);
    border-radius: var(--theme-radius);
    background-color: var(--theme-background-raised);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}
.wf-group-prompt-title {
    font-size: var(--theme-font-size-sm);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.wf-group-prompt-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Canvas Column Layout ─────────────────────────────────────────── */

.wf-canvas-columns {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.wf-canvas-column {
    flex: 1;
    min-width: 220px;
}

.wf-canvas-column-header {
    font-size: var(--theme-font-size-xs);
    font-weight: 600;
    color: var(--theme-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--theme-border);
}

/* ── Entity Selector ──────────────────────────────────────────────── */

.wf-entity-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--theme-border);
}
.wf-entity-selector select {
    max-width: 300px;
}
