/* 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;
}
.wf-pill[data-wf-status="in_review"] { background: #fef3c7; color: #92400e; }
.wf-pill[data-wf-status="changes_requested"] { background: #fee2e2; color: #991b1b; }
.wf-pill[data-wf-status="approved"] { background: #dcfce7; color: #166534; }
.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; }

.btn.wf-approve {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}
.btn.wf-approve:hover { background: #166534; border-color: #166534; }

.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: #fffbeb;
    color: #78350f;
    border: 1px solid #fcd34d;
}
.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: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.wf-error {
    padding: 0.5rem 0.75rem;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.wf-panel {
    padding: 0.9rem 1rem;
    background: var(--color-base-100, #fff);
    color: var(--color-base-content, #111);
    border: 1px solid color-mix(in srgb, var(--color-base-content, #111) 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: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #93c5fd;
}
.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: #fff7ed; color: #7c2d12; border-color: #fdba74; }

/* 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; }
.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; }
}
