/* Storyraise Video: team workflow (WS7). Composer header pill + actions, the
   floating strip under the header (gate reason, review panel, presence banner),
   and the dashboard card badge. Uses daisyUI's tokens so it follows the theme. */

/* ------------------------------------------------------------ header */
.wf-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.wf-bar .btn .material-symbols-outlined {
    font-size: 1.05rem;
    font-weight: 600;
}
.wf-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 1.6rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    background: color-mix(in srgb, var(--color-base-content, #111) 10%, transparent);
    color: var(--color-base-content, #111);
}
.wf-pill::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}
/* status tints over the theme's text color, so the pill reads on dark and light */
.wf-pill[data-wf-status="in_review"] { background: color-mix(in oklab, #f59e0b 24%, transparent); color: color-mix(in oklab, #f59e0b 55%, var(--color-base-content, #fff)); }
.wf-pill[data-wf-status="changes_requested"] { background: color-mix(in oklab, #ef4444 22%, transparent); color: color-mix(in oklab, #ef4444 55%, var(--color-base-content, #fff)); }
.wf-pill[data-wf-status="approved"] { background: color-mix(in oklab, #22c55e 22%, transparent); color: color-mix(in oklab, #22c55e 55%, var(--color-base-content, #fff)); }
.wf-pill[data-wf-status="approved"]::before,
.wf-pill[data-wf-status="in_review"]::before,
.wf-pill[data-wf-status="changes_requested"]::before { opacity: 1; }

/* Approve is an action, so it is the step's primary (green stays for the Approved status) */
.btn.wf-approve {
    background: var(--sr-btn-primary, #3a4f60);
    border-color: var(--sr-btn-primary, #3a4f60);
    color: var(--sr-btn-primary-content, #fff);
}
.btn.wf-approve:hover { background: var(--sr-btn-primary-hover, #46607a); border-color: var(--sr-btn-primary-hover, #46607a); }

.wf-avatar-btn {
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    line-height: 0;
}
.wf-avatar-btn:disabled { cursor: default; }
.wf-avatar-btn:focus-visible {
    outline: 2px solid var(--color-primary, #2563eb);
    outline-offset: 2px;
}
.wf-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.wf-avatar.is-empty {
    background: transparent;
    color: var(--color-base-content, #111);
    border: 1.5px dashed color-mix(in srgb, var(--color-base-content, #111) 45%, transparent);
}
.wf-avatar.is-empty .material-symbols-outlined { font-size: 1rem; }

/* disabled share buttons keep their shape so the header doesn't jump */
[data-message-builder="header"] .btn:disabled[title] { cursor: not-allowed; }

/* ------------------------------------------------------------ strip under the header */
.wf-strip {
    position: fixed;
    top: calc(var(--builder-header-height, 4rem) + 0.25rem);
    right: 1rem;
    width: min(28rem, calc(100vw - 2rem));
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    pointer-events: none;
}
.wf-strip > * {
    pointer-events: auto;
    margin: 0;
}
.wf-gate-reason,
.wf-notice,
.wf-error,
.wf-presence,
.wf-panel {
    border-radius: 0.6rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    font-size: 0.8rem;
    line-height: 1.4;
}
.wf-gate-reason {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    background: color-mix(in oklab, #f59e0b 16%, var(--color-base-100, #1d232a));
    color: var(--color-base-content, #fff);
    border: 1px solid color-mix(in oklab, #f59e0b 55%, transparent);
}
.wf-gate-reason > .material-symbols-outlined { color: #f59e0b; }
.wf-gate-reason .material-symbols-outlined { font-size: 1rem; line-height: 1.4; }
.wf-gate-text { flex: 1 1 0; min-width: 0; }
.wf-gate-reason.is-flash { animation: wf-flash 0.7s ease-in-out 2; }
@keyframes wf-flash {
    50% { box-shadow: 0 0 0 4px #fbbf24, 0 6px 24px rgba(0, 0, 0, 0.18); }
}
@media (prefers-reduced-motion: reduce) {
    .wf-gate-reason.is-flash { animation: none; outline: 3px solid #fbbf24; }
}
.wf-note {
    flex-basis: 100%;
    padding-left: 1.4rem;
    font-style: italic;
}
.wf-notice {
    padding: 0.5rem 0.75rem;
    background: color-mix(in oklab, #10b981 16%, var(--color-base-100, #1d232a));
    color: var(--color-base-content, #fff);
    border: 1px solid color-mix(in oklab, #10b981 55%, transparent);
}
.wf-error {
    padding: 0.5rem 0.75rem;
    background: color-mix(in oklab, #ef4444 16%, var(--color-base-100, #1d232a));
    color: var(--color-base-content, #fff);
    border: 1px solid color-mix(in oklab, #ef4444 55%, transparent);
}
.wf-panel {
    padding: 0.9rem 1rem;
    background: var(--color-base-100, #1d232a);
    color: var(--color-base-content, #fff);
    border: 1px solid color-mix(in srgb, var(--color-base-content, #fff) 15%, transparent);
}
.wf-panel h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.6rem;
}
.wf-panel .wf-error { box-shadow: none; margin-top: 0.5rem; }
.wf-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.6rem;
}
.wf-field > span { font-size: 0.75rem; font-weight: 600; opacity: 0.8; }
.wf-field select,
.wf-field textarea { width: 100%; }
.wf-hint { font-size: 0.75rem; opacity: 0.75; margin: -0.25rem 0 0.6rem; }
.wf-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}
.wf-people {
    list-style: none;
    margin: 0 0 0.6rem;
    padding: 0;
    max-height: 16rem;
    overflow: auto;
}
.wf-people button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.35rem 0.4rem;
    border: 0;
    border-radius: 0.4rem;
    background: none;
    color: inherit;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
}
.wf-people button:hover,
.wf-people button:focus-visible { background: color-mix(in srgb, var(--color-base-content, #111) 8%, transparent); }
.wf-people button.is-current { font-weight: 700; }
.wf-people button.is-current::after { content: "check"; font-family: "Material Symbols Outlined"; margin-left: auto; }

.wf-presence {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: color-mix(in oklab, #3b82f6 16%, var(--color-base-100, #1d232a));
    color: var(--color-base-content, #fff);
    border: 1px solid color-mix(in oklab, #3b82f6 55%, transparent);
}
.wf-presence > span:not(.material-symbols-outlined) { flex: 1 1 12rem; }
.wf-presence .material-symbols-outlined { font-size: 1.1rem; }
.wf-presence[data-wf-presence="first"] { background: color-mix(in oklab, #f97316 16%, var(--color-base-100, #1d232a)); border-color: color-mix(in oklab, #f97316 55%, transparent); }

/* read-only: the editing steps can't be used (the soft lock's visible half) */
body.wf-read-only [data-message-builder="sidebar"] {
    pointer-events: none;
    opacity: 0.55;
    filter: grayscale(0.4);
}

@media screen and (max-width: 50rem) {
    .wf-bar .btn { padding: 0 0.5rem; }
    .wf-bar .btn .material-symbols-outlined { display: none; }
    .wf-strip { left: 1rem; right: 1rem; width: auto; }
}

/* ------------------------------------------------------------ dashboard card */
.wf-card-badge {
    position: absolute;
    left: 0.5rem;
    bottom: 0.5rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.wf-card-badge .wf-pill { height: 1.4rem; font-size: 0.7rem; background: #334155; color: #e2e8f0; }
/* on a cover image the pill needs a solid fill (the dashboard's dark status colors, as in video-results.css) */
.wf-card-badge .wf-pill[data-wf-status="in_review"] { background: #422006; color: #fde68a; }
.wf-card-badge .wf-pill[data-wf-status="changes_requested"] { background: #450a0a; color: #fecaca; }
.wf-card-badge .wf-pill[data-wf-status="approved"] { background: #14532d; color: #bbf7d0; }
.wf-card-badge .wf-avatar { width: 1.6rem; height: 1.6rem; font-size: 0.65rem; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); }

/* keep the sidebar's first lines clear of the gate reason card */
@media screen and (min-width: 50.01rem) {
    #app:has(.wf-strip > *) [data-message-builder="sidebar"] { padding-top: 3.75rem; }
}
