/* Task card details (Phase 5a) — js/modules/task-card-props.js.
   One compact line of chips under the title: set details first, with their
   value; unset ones faint, by name. Each opens its picker beside it. The
   toolbar keeps only the actions that have no chip. The line sits between
   the header and .modal-body (outside the body's comments layout), so it
   carries the body's side padding itself. */
.task-props {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px var(--space-8) 0;
    flex-shrink: 0;
}

.task-modal.fullscreen .task-props {
    padding: 16px 48px 0;
}

#taskModal .task-props + .modal-body {
    padding-top: var(--space-4);
}

#taskModal.has-comments .task-props + .modal-body {
    padding-top: 0;
}

.task-prop.modal-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.task-prop.modal-action-btn:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.04));
}

.task-prop.modal-action-btn:focus-visible {
    outline: var(--focus-outline);
    outline-offset: var(--focus-outline-offset);
}

.task-prop.modal-action-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.task-prop-value {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Unset: after the set ones, faint, no border until hovered */
.task-prop.modal-action-btn.is-empty {
    order: 1;
    border-color: transparent;
    color: var(--text-tertiary, var(--text-secondary));
}

.task-prop.modal-action-btn.is-empty:hover {
    border-color: var(--border-light);
}

.task-prop.modal-action-btn.is-empty svg {
    color: inherit;
}

.task-prop[hidden] {
    display: none;
}

/* Read-only: nothing changes — but the way back to the meeting still works, and the project and
   area chips go to the project or area (Cadeo #109) */
#taskModal.task-view-only .task-prop:not([data-extra="meeting"], [data-action="project"], [data-action="area"]) {
    pointer-events: none;
}

/* The toolbar icons these chips replace */
#taskModal .modal-footer .modal-action-btn:is([data-action="schedule"], [data-action="deadline"],
    [data-action="duration"], [data-action="repeat"], [data-action="priority"], [data-action="tags"],
    [data-action="project"], [data-action="area"]) {
    display: none;
}

/* Meeting, Assignee, From (Phase 5c): shown only when set; From is information only */
.task-prop.modal-action-btn.is-info {
    cursor: default;
}

.task-prop.modal-action-btn.is-info:hover {
    background: transparent;
}
