/* ─────────────────────────────────────────────────────────────────
   layout-patch.css  — Above-the-fold + compact header fixes
   Add this AFTER style.css on every converter page.
   ───────────────────────────────────────────────────────────────── */

/* ── 1. Page wrapper ── */
.page-wrap {
  padding-top: .75rem;
  padding-bottom: 1rem;
}

/* ── 2. Breadcrumb ── */
.breadcrumb {
  margin-bottom: .3rem;
  font-size: .65rem;
}

/* ── 3. Page header: one line, small ── */
.page-header {
  margin-bottom: .6rem;
  display: flex;
  align-items: baseline;
  gap: .75rem;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.1rem !important;
  letter-spacing: -.02em;
  margin-bottom: 0;
  white-space: nowrap;
}
.page-header p {
  font-size: .75rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* ── 4. Converter layout: sidebar drives height naturally ── */
.converter-layout {
  align-items: start;
  overflow: visible;
  height: auto;
  min-height: 0;
}

/* Left column stretches to match sidebar height */
.converter-layout > div:first-child {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  overflow: hidden;
  min-height: 0;
}

/* ── 5. Upload zone: capped at ~3/4 of original ── */
.upload-zone {
  flex: 1;
  min-height: 0;
  max-height: 220px;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  gap: .5rem;
}
.upload-icon {
  width: 34px;
  height: 34px;
  font-size: .95rem;
  border-radius: 8px;
}
.upload-label { font-size: .8rem; }
.upload-sub   { font-size: .63rem; }

/* ── 6. Preview area ── */
.preview-area {
  flex: 1;
  min-height: 0;
  overflow: visible;   /* đổi hidden → visible */
  display: none;
  flex-direction: column;
  gap: .45rem;
}
.preview-area.visible { display: flex; }

.preview-comparison,
.ixc-slider-wrap {
  flex: none;
  min-height: 0;
  aspect-ratio: unset !important;
  height: 340px;    /* ← đặt chiều cao cố định thay vì auto hay 100% */
}
.ixc-slider-wrap {
  width: 100%;
  border-radius: 8px;
  max-height: 340px;
}
.preview-img-wrap {
  flex: 1;
  min-height: 60px;
}

/* ── 7. Sidebar: NO scroll, show all panels ── */
.sidebar {
  overflow: visible;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

/* ── 8. Panel ── */
.panel {
  padding: .85rem 1rem;
  flex-shrink: 0;
}
.panel-title {
  font-size: .67rem;
  margin-bottom: .6rem;
}

/* ── 9. Fields ── */
.field { margin-bottom: .55rem; }
.field:last-child { margin-bottom: 0; }
label.field-label {
  font-size: .67rem;
  margin-bottom: .2rem;
}
select {
  font-size: .77rem;
  padding: .4rem .7rem;
}

/* ── 10. Buttons ── */
.btn-primary {
  padding: .6rem;
  font-size: .8rem;
}
.btn-secondary,
.btn-ghost {
  font-size: .77rem;
  padding: .4rem .7rem;
}
.divider { margin: .55rem 0; }

/* ── 11. Info box ── */
.info-box {
  font-size: .71rem;
  padding: .65rem .75rem;
  line-height: 1.5;
}

/* ── 12. Progress & status ── */
.progress-wrap { gap: .25rem; }
.progress-label { font-size: .63rem; }
.status { font-size: .68rem; padding: .35rem .65rem; }

/* ── 13. Meta ── */
.preview-meta {
  font-size: .63rem;
  padding: .4rem .6rem;
  gap: .18rem;
}

/* ── 14. Responsive ── */
@media (max-width: 860px) {
  .converter-layout {
    height: auto;
    overflow: visible;
  }
  .converter-layout > div:first-child {
    height: auto;
    align-self: auto;
  }
  .upload-zone {
    max-height: 180px;
  }
  .ixc-slider-wrap {
    aspect-ratio: 4/3 !important;
    height: auto;
    max-height: none;
  }
  .page-header {
    flex-direction: column;
    gap: .2rem;
  }
}
