/* pages.css — Processing/result page, footer and misc */
/* Processing/result page */
.result-container { width: min(960px, 100%); }
.result-intro { align-items: flex-start; }
.result-intro .lead { min-width: 0; overflow-wrap: anywhere; }
.result-intro code { word-break: break-all; }
.card { min-width: 0; margin-top: 1rem; padding: 1.3rem 1.4rem;
        border: 1px solid var(--line); border-radius: var(--r);
        background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm); }
.status-inline { margin: 0; color: var(--ink-soft); }
.result-status-badges { display: inline-flex; align-items: center; gap: .55rem; }
.progress-bar { height: 8px; margin: 1rem 0; overflow: hidden;
                border-radius: 999px; background: var(--line); }
.progress-bar .fill { width: 8%; height: 100%; border-radius: inherit;
                      background: var(--grad-button); transition: width .35s ease; }
.result-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
               gap: .7rem; min-width: 0; }
.result-meta span { min-width: 0; padding: .7rem .8rem; border-radius: var(--r-xs);
                    background: var(--paper-soft); color: var(--ink-soft);
                    overflow-wrap: anywhere; }
.result-meta strong { display: block; margin-bottom: .15rem; color: var(--muted);
                      font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.btn-download { display: inline-flex; align-items: center; justify-content: center;
                min-height: 40px; padding: .5rem .85rem; border: 1px solid var(--teal);
                border-radius: var(--r-xs); background: var(--teal-soft);
                color: var(--teal-dark); font-weight: 700; }
.btn-download:hover { background: var(--teal); color: white; text-decoration: none; }
.result-video { display: block; width: 100%; max-width: 100%; height: auto;
                max-height: 70vh; border-radius: var(--r-sm); background: #050807;
                object-fit: contain; }
audio.result-video { min-height: 54px; background: transparent; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.result-item { min-width: 0; padding: .85rem; border: 1px solid var(--line);
               border-radius: var(--r-sm); background: var(--paper-soft); }
.result-item-head { display: flex; align-items: center; justify-content: space-between;
                    gap: .7rem; margin-bottom: .7rem; }
.result-item-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis;
                           white-space: nowrap; font-size: .82rem; }
.result-item .btn-download { min-height: 34px; padding: .4rem .65rem; font-size: .74rem; }
.result-item .result-video { max-height: 56vh; }
#media-ready-status[data-state="success"] { color: var(--green); }
#media-ready-status[data-state="error"] { color: var(--red); }
.log-card summary { color: var(--ink-soft); font-weight: 700; cursor: pointer; }
.logs { min-width: 0; margin-top: .8rem; padding: .8rem;
        border-radius: var(--r-xs); background: #17211f; color: #d8e6e1;
        font: .76rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
        overflow-wrap: anywhere; white-space: pre-wrap; }

/* Footer */
footer { display: flex; justify-content: center; gap: 1.2rem; margin-top: 2.2rem;
          padding-top: 1.2rem; border-top: 1px solid var(--line);
          color: var(--muted); font-size: .78rem; flex-wrap: wrap; }
footer a { color: var(--muted); font-weight: 500; }
footer a:hover { color: var(--teal-dark); }

/* Misc */
.hidden { display: none !important; }

/* Polling error state on the result page. A class rather than an inline style
   so the page needs no 'unsafe-inline' in its Content-Security-Policy. */
#status-text.is-error { color: var(--red); }
