/* LLT status help, confirmation and last-update presentation. */
.status-heading-with-info,
.field-label-with-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.field-label-with-info { margin-bottom: 7px; }
.field-label-with-info label { margin-bottom: 0; }

.status-info-button {
    width: 21px;
    height: 21px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--muted) 28%, var(--border));
    border-radius: 50%;
    background: color-mix(in srgb, var(--surface) 92%, var(--muted) 8%);
    color: var(--muted);
    font: 700 11px/1 system-ui, sans-serif;
    cursor: pointer;
    transition: color 120ms ease-out, border-color 120ms ease-out, background-color 120ms ease-out, transform 120ms ease-out;
}
.status-info-button:hover {
    color: var(--text);
    border-color: color-mix(in srgb, var(--brand, #c99a2e) 48%, var(--border));
    background: color-mix(in srgb, var(--brand, #c99a2e) 8%, var(--surface));
    transform: translateY(-1px);
}
.status-info-button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--brand, #c99a2e) 68%, transparent);
    outline-offset: 2px;
}

.status-guide-dialog,
.status-confirm-dialog {
    width: min(620px, calc(100vw - 32px));
    max-height: min(820px, calc(100dvh - 32px));
    border: 0;
    padding: 0;
    border-radius: 16px;
    color: var(--text);
    background: transparent;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .30);
}
.status-confirm-dialog { width: min(520px, calc(100vw - 32px)); }
.status-guide-dialog::backdrop,
.status-confirm-dialog::backdrop {
    background: rgba(3, 8, 18, .58);
    backdrop-filter: blur(3px);
}
.status-guide-dialog[open],
.status-confirm-dialog[open] {
    animation: llt-status-dialog-in 180ms ease-out both;
}
.status-dialog-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    overflow: auto;
    max-height: min(820px, calc(100dvh - 32px));
}
.status-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.status-dialog-head h2 { margin: 4px 0 5px; font-size: 21px; }
.status-dialog-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.status-dialog-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    font-size: 22px;
    cursor: pointer;
}
.status-dialog-close:hover { color: var(--text); background: var(--surface-2); }
.status-guide-list--dialog { gap: 3px; }
.status-guide-list--dialog .status-guide-item { padding: 10px 8px; }

.status-change-summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin: 16px 0 18px;
}
.status-change-summary > div {
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2);
}
.status-change-summary small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.status-change-summary strong { display: block; font-size: 14px; }
.status-change-arrow { color: var(--muted); font-size: 17px; }
html[dir="rtl"] .status-change-arrow { transform: scaleX(-1); }

.status-note-field { display: grid; gap: 8px; }
.status-note-field > span { font-weight: 700; font-size: 13px; }
.status-note-field > span small { color: var(--muted); font-weight: 500; }
.status-note-field textarea {
    width: 100%;
    min-height: 92px;
    resize: vertical;
    font-size: 14px;
    line-height: 1.6;
}
.status-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}
.status-dialog-actions .btn[aria-busy="true"] { cursor: wait; opacity: .72; }

.updated-cell {
    min-width: 122px;
}
.updated-cell > strong,
.detail-time-stack > strong {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    color: var(--text);
    font-weight: 750;
}
.updated-cell > small,
.detail-time-stack > small,
.activity-strip__absolute {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.3;
    white-space: nowrap;
    font-style: normal;
}
.detail-time-stack { display: block; }
.order-card__updated em {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
}

@keyframes llt-status-dialog-in {
    from { opacity: 0; transform: translateY(6px) scale(.988); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
    .status-info-button { width: 26px; height: 26px; font-size: 12px; }
    .status-guide-dialog,
    .status-confirm-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
    .status-dialog-panel { padding: 18px; max-height: calc(100dvh - 20px); }
    .status-change-summary { grid-template-columns: 1fr; gap: 7px; }
    .status-change-arrow { justify-self: center; transform: rotate(90deg); }
    html[dir="rtl"] .status-change-arrow { transform: rotate(90deg); }
    .status-dialog-actions { display: grid; grid-template-columns: 1fr; }
    .status-dialog-actions .btn { width: 100%; min-height: 46px; }
    .status-note-field textarea { font-size: 16px; }
    .order-card__updated b { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    .status-info-button { transition: none; }
    .status-info-button:hover { transform: none; }
    .status-guide-dialog[open], .status-confirm-dialog[open] { animation: none; }
}
