/* ==========================================================================
   BEEVIDEO STUDIO - OUTPUT & EXPORT HUB (CỘT PHẢI) & TABS BIÊN TẬP (CỘT TRÁI)
   ========================================================================== */

/* ── CỘT TRÁI: HÀNG TAB 4 MỤC CHUẨN ── */
.cot-bien-tap-tabs {
  flex: none;
  display: flex;
  background: var(--surface-mo);
  border-bottom: 1px solid var(--line);
  padding: 0 4px;
  margin: calc(var(--sp-16) * -1) calc(var(--sp-10) * -1) var(--sp-10);
  gap: 2px;
}

.cot-tab-btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: var(--sp-10) 4px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-faint);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cot-tab-btn:hover {
  color: var(--text);
}

.cot-tab-btn.dang-chon {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.cot-tab-btn .btn-icon {
  display: inline-flex;
  align-items: center;
}

.cot-tab-btn svg {
  width: 15px;
  height: 15px;
}

/* ── CỘT PHẢI: OUTPUT HUB ── */
.output-hub {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  padding: var(--sp-14) var(--sp-16);
  background: var(--panel);
  overflow-y: auto;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-14);
  padding-bottom: var(--sp-10);
  border-bottom: 1px solid var(--line);
}

.output-title-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.output-title-wrap h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.output-title-wrap .btn-icon {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
}

.output-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.output-badge.ready {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.output-badge.draft {
  background: var(--surface-strong);
  color: var(--text-faint);
  border: 1px solid var(--line);
}

.output-badge.rendering {
  background: rgba(255, 140, 0, 0.15);
  color: var(--accent);
  border: 1px solid rgba(255, 140, 0, 0.35);
  animation: pulse 1.5s infinite;
}

/* ── THÀNH PHẨM: PLAYER VIDEO & ACTIONS ── */
.output-video-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  margin-bottom: var(--sp-14);
  border: 1px solid var(--line);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.output-video-el {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #09090b;
}

/* Metadata Card */
.output-meta-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: var(--sp-12) var(--sp-14);
  margin-bottom: var(--sp-16);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8) var(--sp-12);
}

.output-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.output-meta-label {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.output-meta-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* Action Buttons */
.output-actions-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  margin-bottom: var(--sp-16);
}

.output-btn-main {
  width: 100%;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(255, 140, 0, 0.25);
  transition: all 0.15s ease;
  font-family: inherit;
}

.output-btn-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 140, 0, 0.35);
}

.output-btn-sub {
  width: 100%;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--control-line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.output-btn-sub:hover {
  background: var(--surface-strong);
  border-color: var(--text-faint);
}

.output-recreate-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
}

.output-recreate-link:hover {
  color: var(--text);
}

/* ── CONFIG SECTION: TỐC ĐỘ, ĐỘ PHÂN GIẢI & CTA ── */
.output-config-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: var(--sp-14);
  margin-bottom: var(--sp-16);
  display: flex;
  flex-direction: column;
  gap: var(--sp-14);
}

.output-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.output-field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.output-chips-row {
  display: flex;
  gap: 6px;
}

.output-chip {
  flex: 1 1 0;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-strong);
  border: 1px solid var(--control-line);
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.output-chip:hover {
  color: var(--text);
  border-color: var(--text-faint);
}

.output-chip.dang-chon {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.output-cta-render {
  width: 100%;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
  transition: all 0.15s ease;
  font-family: inherit;
}

.output-cta-render:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 140, 0, 0.4);
}

/* ── PROGRESS SECTION KHI ĐANG RENDER ── */
.output-progress-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: var(--sp-14);
  margin-bottom: var(--sp-16);
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
}

.output-progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: var(--surface-strong);
  border-radius: 5px;
  overflow: hidden;
}

.output-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #ea580c 100%);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.output-progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 600;
}

.output-status-msg {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.4;
}

.output-steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.output-step-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.output-step-row.done {
  color: #10b981;
}

.output-step-row.active {
  color: var(--accent);
  font-weight: 700;
}

.output-step-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.output-step-row.done .output-step-circle {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.output-step-row.active .output-step-circle {
  background: var(--accent);
  color: #fff;
}

.output-btn-stop {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface);
  color: var(--bad);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.output-btn-stop:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--bad);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
