/* =====================================================================
   Common states of the four applications (PBI #516): the loading skeleton (.ux-skeleton), the frame that replaces an
   image that failed to load (.ux-img-fallback, made by fcc-boot.js for every <img data-fallback>) and the look of
   StateBlock in the public family (Marketplace and chat). Colours come from currentColor and the tokens of each
   family, so they follow the theme; with prefers-reduced-motion nothing moves.
   ===================================================================== */
.ux-skeleton {
    display:block; height:12px; border-radius:3px; overflow:hidden;
    background:linear-gradient(90deg, transparent, color-mix(in srgb, currentColor 22%, transparent), transparent) 0 0/40% 100% no-repeat,
               color-mix(in srgb, currentColor 14%, transparent);
    animation:ux-skeleton-sheen 1.2s linear infinite;
}
.ux-skeleton.is-short { width:55%; }
.ux-skeleton.is-block { height:64px; }
@keyframes ux-skeleton-sheen { from { background-position:-40% 0, 0 0; } to { background-position:140% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) {
    .ux-skeleton { animation:none; }
}

/* An image that failed (data-fallback in the markup, class added by fcc-boot.js): a frame of its size with the generic
   icon (Lucide «image»); content: url() replaces the broken-image mark and the alternative text. */
img.ux-img-fallback {
    content:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 48 48' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/%3E%3C/svg%3E");
    object-fit:none; box-sizing:border-box; min-height:48px; padding:12%;
    border:1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius:3px;
    background:color-mix(in srgb, currentColor 8%, transparent);
}

/* StateBlock outside the panel and Unit Control: the public family (tokens of site.css). */
.fcc-site .ux-state {
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
    max-width:640px; margin:24px auto; padding:28px 22px;
    border:1px dashed var(--line-2); border-radius:8px; background:transparent; color:var(--text-2); text-align:center;
}
.fcc-site .ux-state.is-compact { margin:10px auto; padding:14px 12px; gap:6px; }
.fcc-site .ux-state-icon { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border:1px solid currentColor; border-radius:50%; color:var(--gold); }
.fcc-site .ux-state-title { display:block; margin:0; color:var(--text); font-size:1rem; font-weight:600; }
.fcc-site .ux-state-text { margin:0; font-size:.9rem; }
.fcc-site .ux-state .ux-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:6px; }

/* Tabs (UI.Shared Tabs, PBI #609): each family draws its own tabs; here only what all share. On a narrow screen the
   list scrolls sideways instead of wrapping, and a disabled tab looks unavailable (its reason is in the tooltip): muted
   text as every disabled control, no opacity (PBI #621). */
.ui-tabs { scrollbar-width: thin; }
.ui-tabs > [role="tab"][aria-disabled="true"] { color: var(--on-surface-muted); cursor: not-allowed; }
@media (max-width: 640px) {
    .ui-tabs { flex-wrap: nowrap; overflow-x: auto; }
    .ui-tabs > [role="tab"] { flex: none; }
}

/* The disabled buttons and their reason (.btn-reason, PBI #604) are in fcc-ui.css (PBI #596). */
