/* post2video page specific styles */

.ai-workspace.ai-workspace--swap-pro-gated {
    justify-content: center;
}

.ai-workspace.ai-workspace--swap-pro-gated .ai-video-post-swap-pro-gate {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
}

.ai-video-post-swap-pro-gate {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: var(--ws-bg, #1a1a1a);
}

.ai-video-post-swap-pro-gate-inner {
    max-width: 420px;
    text-align: center;
}

.ai-video-post-swap-pro-gate-text {
    margin: 0 0 20px;
    color: var(--ws-text, #e0e0e0);
    font-size: 1.05rem;
    line-height: 1.6;
}

.ai-video-post-swap-pro-gate-btn {
    min-width: 168px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
}

.ai-video-post-job-card {
    position: relative;
    overflow: hidden;
}

/* disabled 按钮不接收 hover，tooltip 挂在外层 wrap；pointer-events:none 让事件落到 wrap */
.ai-video-post-phase4-replace-wrap {
    vertical-align: middle;
}

.ai-video-post-phase4-replace-wrap > .btn:disabled {
    pointer-events: none;
}

.ai-video-post-phase4-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    border-radius: inherit;
    background:
        radial-gradient(circle at center, rgba(41, 121, 255, 0.22), transparent 62%),
        rgba(5, 8, 16, 0.82);
    backdrop-filter: blur(2px);
}

.ai-video-post-phase4-card-cancel {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 92, 92, 0.78);
    border-radius: 999px;
    background: rgba(168, 26, 26, 0.92);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.ai-video-post-phase4-card-cancel:hover {
    background: #d62828;
}

.ai-video-post-phase4-card-overlay-inner {
    width: min(86%, 300px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.ai-video-post-phase4-card-spinner {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 999px;
    color: #59a3ff;
    background: rgba(89, 163, 255, 0.14);
    box-shadow: 0 0 22px rgba(89, 163, 255, 0.28);
}

.ai-video-post-phase4-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
}

.ai-video-post-phase4-card-subtitle,
.ai-video-post-phase4-card-elapsed {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    line-height: 1.35;
}

.ai-video-post-phase4-card-progress {
    width: 100%;
    height: 8px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.ai-video-post-phase4-card-progress-bar {
    position: relative;
    height: 100%;
    min-width: 12px;
    border-radius: inherit;
    background: linear-gradient(90deg, #1d8bff, #7fc2ff);
    transition: width 0.28s ease;
}

.ai-video-post-phase4-card-progress-bar.is-indeterminate::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
    animation: ai-video-post-phase4-progress-sheen 1.25s linear infinite;
}

@keyframes ai-video-post-phase4-progress-sheen {
    0% {
        left: -45%;
    }
    100% {
        left: 105%;
    }
}

.ai-video-post-phase4-source-picker-mask {
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ai-video-post-phase4-source-picker-dialog {
    width: min(1100px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #12141c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    overflow: hidden;
}

.ai-video-post-phase4-source-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-video-post-phase4-source-picker-token {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    color: #ffd36a;
    font-size: 13px;
    line-height: 1.35;
    background: rgba(255, 190, 72, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-video-post-phase4-source-picker-title {
    color: #f5f7ff;
    font-size: 16px;
    font-weight: 600;
}

.ai-video-post-phase4-source-picker-close {
    border: 0;
    background: transparent;
    color: rgba(245, 247, 255, 0.8);
    font-size: 16px;
    cursor: pointer;
}

.ai-video-post-phase4-source-picker-body {
    padding: 14px 16px;
    overflow: auto;
    min-height: 240px;
}

.ai-video-post-phase4-source-picker-loading,
.ai-video-post-phase4-source-picker-empty {
    color: rgba(245, 247, 255, 0.85);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ai-video-post-phase4-source-picker-list {
    display: grid;
    gap: 10px;
}

.ai-video-post-phase4-source-item {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.ai-video-post-phase4-source-item.active {
    border-color: rgba(89, 163, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(89, 163, 255, 0.35);
}

.ai-video-post-phase4-source-preview-wrap {
    width: 100%;
}

.ai-video-post-phase4-source-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    background: #000;
}

.ai-video-post-phase4-source-meta {
    display: grid;
    align-content: start;
    gap: 8px;
    color: rgba(245, 247, 255, 0.92);
}

.ai-video-post-phase4-source-meta-headline {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    word-break: break-word;
}

.ai-video-post-phase4-source-meta-sub {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(245, 247, 255, 0.78);
    word-break: break-word;
}

.ai-video-post-phase4-source-meta-sub .fas {
    margin-right: 6px;
    opacity: 0.9;
}

.ai-video-post-face-swap-quality-hint {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(245, 247, 255, 0.55);
}

.ai-video-post-phase4-source-meta-detail {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(245, 247, 255, 0.68);
    word-break: break-word;
}

.ai-video-post-phase4-source-meta-line {
    font-size: 13px;
    line-height: 1.3;
}

.ai-video-post-phase4-source-version {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.ai-video-post-phase4-source-meta-label {
    color: rgba(245, 247, 255, 0.65);
}

.ai-video-post-phase4-source-picker-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

