/* Phase 6 split from frontend/static/app.css */
/* Section: product_output */

/* Product Output Manager: migrated as an additive V4-native surface. */
.product-output-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.9));
    margin-bottom: 18px;
}

.product-output-kicker {
    color: #93c5fd;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.product-output-hero h3 {
    margin: 6px 0;
    font-size: 28px;
}

.product-output-hero p {
    color: var(--text-muted, #94a3b8);
    margin: 0;
}

.product-output-hero-code {
    min-width: 140px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 18px;
    padding: 14px;
    text-align: center;
    background: rgba(251, 191, 36, 0.12);
}

.product-output-hero-code span,
.product-output-meta,
.product-output-file-meta,
.product-output-detail-stats,
.product-output-realtime-updated-at {
    color: var(--text-muted, #94a3b8);
    font-size: 12px;
}

.product-output-hero-code strong {
    display: block;
    color: #fbbf24;
    font-size: 30px;
    line-height: 1.2;
}

.product-output-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.product-output-toolbar .form-input {
    min-width: 280px;
    flex: 1;
}

.pom-progress-dashboard {
    padding: 16px;
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    margin-bottom: 18px;
}

.pom-progress-header,
.pom-progress-detail,
.pom-progress-breakdown,
.product-output-card-top,
.product-output-detail-head,
.product-output-file-row,
.product-output-file-main,
.product-output-file-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pom-progress-header,
.product-output-card-top,
.product-output-detail-head {
    justify-content: space-between;
}

.pom-progress-label,
.pom-progress-pct {
    font-weight: 800;
}

.pom-progress-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
    margin: 10px 0;
}

.pom-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #34d399, #60a5fa);
    transition: width 0.24s ease;
}

.pom-progress-breakdown {
    flex-wrap: wrap;
}

.pom-progress-chip,
.product-output-mode-badge,
.product-output-download-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted, #94a3b8);
    font-size: 12px;
}

.pom-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.pom-progress-chip.completed .pom-chip-dot { background: #34d399; }
.pom-progress-chip.partial .pom-chip-dot { background: #fbbf24; }
.pom-progress-chip.not-started .pom-chip-dot { background: #f87171; }

.product-output-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.35fr);
    gap: 18px;
}

.product-output-card {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.7);
    color: inherit;
    cursor: pointer;
    margin-bottom: 10px;
}

.product-output-card:hover,
.product-output-card.active {
    border-color: rgba(96, 165, 250, 0.58);
    background: rgba(30, 64, 175, 0.2);
}

.product-output-code,
.product-output-detail-code {
    color: #bfdbfe;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 20px;
    font-weight: 900;
}

.product-output-code.fallback {
    color: #fbbf24;
}

.product-output-count,
.product-output-name,
.product-output-detail-name,
.product-output-file-name {
    font-weight: 800;
}

.product-output-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.product-output-files {
    display: grid;
    gap: 10px;
}

.product-output-file-row {
    justify-content: space-between;
    align-items: stretch;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.56);
}

.product-output-file-main {
    min-width: 0;
}

.product-output-file-main-text {
    min-width: 0;
}

.product-output-file-path {
    color: var(--text-muted, #94a3b8);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.product-output-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.product-output-thumb-btn {
    width: 82px;
    height: 58px;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.7);
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
}

.product-output-thumb-btn.disabled {
    cursor: default;
}

.product-output-thumb-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-output-thumb-fallback {
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
}

.product-output-download-badge.downloaded {
    border-color: rgba(52, 211, 153, 0.42);
    color: #86efac;
}

.product-output-download-badge.pending {
    border-color: rgba(251, 191, 36, 0.42);
    color: #fde68a;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, 0.78);
}

.product-output-preview-modal {
    width: min(980px, 96vw);
    max-height: 92vh;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 20px;
    background: #0f172a;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
}

.product-output-preview-header,
.product-output-preview-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.product-output-preview-title {
    font-weight: 900;
}

.product-output-preview-subtitle {
    color: var(--text-muted, #94a3b8);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.product-output-preview-body {
    padding: 16px;
}

.product-output-preview-media {
    width: 100%;
    max-height: 68vh;
    border: 0;
    border-radius: 14px;
    background: #020617;
}

.product-output-preview-audio-player {
    width: 100%;
}

@media (max-width: 900px) {
    .product-output-layout,
    .product-output-hero {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .product-output-file-row,
    .product-output-detail-head {
        flex-direction: column;
    }

    .product-output-file-actions {
        justify-content: flex-start;
    }
}
