/* Shared by English and localized pages; media editor overlays keep their own layout. */
:root {
  --site-shell-width: calc(80rem + 88px);
  --site-content-width: calc(78rem - 60px);
  --site-header-height: 100px;
  --site-breadcrumbs-height: 0px;
  --site-fixed-height: calc(var(--site-header-height) + var(--site-breadcrumbs-height));
}

:root:has(.breadcrumbs-wrapper) { --site-breadcrumbs-height: 40px; }
html { scroll-padding-top: calc(var(--site-fixed-height) + 20px); }
body { padding-top: var(--site-fixed-height); }

.main-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 995;
  padding-top: 10px;
  background: #fff;
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 5px 0;
}

.main-header .header-container.is-open .header-top-row {
  padding: 10px 10px 10px 25px;
}

@media (min-width: 993px) {
  .main-header .header-container.is-open .main-nav {
    /* Offset half the 25px/10px inset imbalance and the logo's 0.75rem padding change. */
    position: relative;
    left: calc(0.375rem - 7.5px);
  }
}

.main-header .header-container,
.breadcrumbs-wrapper .contain,
.main-footer > .container {
  width: min(var(--site-shell-width), calc(100% - 32px));
  max-width: calc(100% - 32px);
  margin-inline: auto;
}

.breadcrumbs-wrapper {
  position: fixed;
  inset: var(--site-header-height) 0 auto;
  z-index: 980;
  background: #fff;
}

.breadcrumbs-wrapper .contain {
  padding: 12px 0;
  margin-bottom: 0;
}

.breadcrumbs-wrapper .breadcrumbs { padding: 0; overflow-x: auto; overflow-y: hidden; }
.breadcrumbs ul { align-items: center; white-space: nowrap; min-height: 16px; }
.main-content .container { max-width: 100%; }

.main-content .container:not(.mainpage) {
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0rem;
  padding-bottom: 0rem;
  min-height: calc(100vh - 28rem);
}

.main-content .container.contact-container {
  padding-top: 6rem;
}

.main-content .promo-section {
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 4rem;
  padding-bottom: 2rem;
  gap: 0.5rem;
  margin: 2.5rem auto 0rem auto;
  background: #ffffff;
  color: #000000;
  border: 0.05rem solid #f4f5f9;
  width: 100%;
}

.main-content .container:not(.mainpage) h1 {
  color: #121212;
  font-size: 2.6rem;
  font-weight: 600;
  margin: 0rem 0 0.85rem;
  text-align: left;
}

.merge-wrapper .merge-field .upload-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.converter-page, .merge-page, .change-speed-page {
  padding-top: 3.5rem !important;
  padding-bottom: 2.5rem;
}

.main-content .container.custom-m3u8-form {
  padding-top: 3.5rem !important;
}

.custom-m3u8-form .custom-form {
  width: min(56rem, 100%);
  max-width: 100%;
  min-width: 0;
}

.main-content .container:not(.mainpage).download-page,
.main-content .container:not(.mainpage).play-page {
  /* These result pages have no breadcrumbs; retain the same title baseline. */
  padding-top: calc(3.5rem + max(0px, 40px - var(--site-breadcrumbs-height))) !important;
}

.main-content .container:not(.mainpage).download-page {
  padding-bottom: 4rem;
  min-height: 0;
}

.download-page .custom-form {
  background: #F7F8FC;
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-top: 1rem;
  width: 90%;
  padding: 2rem 3rem;
  border: 1px solid #EEF2FF;
  border-radius: 2rem;
}

.progress {
  border-radius: 0.8rem;
  position: relative;
  margin: 1rem 0 0rem 0;
  height: 3rem;
  overflow-x: hidden;
  width: 100%;
  background: #eef1fc;
}

.download-page .custom-form,
.download-page .main-info-keeper {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.merge-wrapper {
  width: 90%;
  padding: 1rem;
  margin: 2rem auto 4rem auto;
  border-radius: 3rem;
  display: flex;
  background: #F9FAFE;
}

.converter-page .drop-area {
  width: 90%;
  padding: 1rem;
  min-height: 266.9px;
  margin: 2rem auto 4rem auto;
  border-radius: 3rem;
  display: flex;
  background: #F9FAFE;
}

/* Audio workspaces share the merge editor's dark shell after upload only. */
body.has-audio-cutter-dock {
  overflow: hidden;
}

.audio-cutter-editor {
  position: fixed;
  inset: 12px;
  z-index: 10000;
  width: auto;
  margin: 0;
  padding: 64px 20px calc(60px + 6rem);
  border-radius: 24px;
  background: #000;
  box-shadow: 0 0 0 24px #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.audio-editor-logo {
  position: absolute;
  top: 16px;
  left: 18px;
  display: block;
  line-height: 0;
}

.audio-editor-logo svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

.audio-editor-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #262626;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.audio-editor-close svg {
  width: 12px;
  height: 12px;
  stroke: #737373;
}

.audio-editor-logo:focus-visible,
.audio-editor-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.audio-editor-center {
  width: min(1100px, 100%);
  margin: auto;
  min-height: 0;
  overflow: auto;
  scrollbar-color: #444 #000;
}

.audio-editor-center > .audio-editor-title {
  margin: 0 0 .85rem;
  color: #fff;
  font-size: 2.2rem;
  font-weight: 600;
  text-align: center;
}

.audio-editor-center > .audio-editor-subtitle {
  margin: 0 0 2rem;
  color: #c8c9d1;
  font-size: .95rem;
  line-height: 1.7;
  text-align: center;
}

.audio-cutter-editor .audio-cutter-container {
  background: #1d1d1d;
  border-radius: 16px;
}

.audio-cutter-editor .audio-cut-row,
.audio-cutter-editor .audio-cutter-list.has-active-cut .audio-cut-row:not(.is-active) {
  background: #292929;
}

.audio-cutter-editor .audio-cut-control,
.audio-cutter-editor .audio-cut-waveform,
.audio-cutter-editor .audio-cut-time,
.audio-cutter-editor .audio-cut-format,
.audio-cutter-editor .audio-cut-number {
  background: #363636;
  color: #c8c9d1;
}

.audio-cutter-editor .audio-cut-row .audio-cut-control,
.audio-cutter-editor .audio-cut-row .audio-cut-time input,
.audio-cutter-editor .audio-cut-format select {
  color: #c8c9d1;
}

.audio-cutter-editor .audio-cut-number { color: var(--audio-cut-color); }
.audio-cutter-editor .audio-cut-control:hover,
.audio-cutter-editor .audio-cut-waveform:hover { background: #444; }
.audio-cutter-editor .audio-cut-fade.is-active { background: #7b75ff; }
.audio-cutter-editor .audio-cut-waveform span { background: #777; }
.audio-cutter-editor .audio-cut-waveform span.is-played,
.audio-cutter-editor .audio-cutter-list.has-active-cut .audio-cut-row:not(.is-active) .audio-cut-waveform span.is-played { background: var(--audio-cut-color); }

.audio-cutter-editor .audio-cutter-actions > button,
.audio-cutter-editor .audio-cutter-final-format {
  background: #363636;
  color: #fff;
}

.audio-cutter-editor .audio-cutter-actions > button:hover { background: #444; }
.audio-cutter-editor #mergeBtn,
.audio-cutter-editor.is-processing #mergeBtn:disabled { background: #7b75ff; }
.audio-cutter-editor .audio-cutter-actions > button:disabled,
.audio-cutter-editor .audio-cutter-final-format.is-disabled { opacity: .35; }
.audio-cutter-editor button:focus-visible,
.audio-cutter-editor input:focus-visible,
.audio-cutter-editor select:focus-visible {
  outline: 2px solid #7b75ff;
  outline-offset: 2px;
}

.audio-cutter-editor .audio-cutter-status {
  color: #c8c9d1;
}

.audio-cutter-editor.is-processing {
  opacity: 1;
}

.audio-cutter-editor.is-processing .audio-cutter-container {
  opacity: 0.72;
}

.has-audio-cutter-dock .audio-cutter-dock {
  z-index: 10001;
}

.has-audio-cutter-dock .audio-cutter-gradient-blur {
  display: none;
}

.has-audio-cutter-dock .audio-cutter-drop-overlay {
  z-index: 10002;
}

@media (max-width: 600px) {
  .audio-cutter-editor {
    inset: 0;
    padding: 64px 12px calc(60px + 6rem);
    border-radius: 0;
  }

  .audio-editor-logo {
    top: 17px;
    left: 12px;
  }

  .audio-editor-close {
    top: 17px;
    right: 12px;
  }

  .audio-editor-center > .audio-editor-title { font-size: 1.8rem; }
  .audio-cutter-editor .audio-cutter-container { padding: 1rem; }
}

.white-section,
.inner-m3u8-page .white-section {
  background: #F9FAFE;
  padding: 3rem 2rem 2rem 2rem;
  border-radius: 2rem;
}

.side-blocks .side-block {
  background: white;
  box-sizing: border-box;
  padding: 2rem;
  position: relative;
  border: 0.05rem solid #e1e3eb;
  cursor: pointer;
  border-radius: 1.5rem;
  width: 100%;
}

.main-content section.two-text-one {
  margin-top: 2rem;
  background: white;
}

section.two-text-one .text-block {
  background: #ffffff;
  color: #000000;
  border: 0.05rem solid #e1e3eb;
  padding: 2.5rem;
  width: 50%;
  border-radius: 2rem;
  transition: 0.3s ease;
  cursor: pointer;
}

section.two-text-one h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

section.two-text-one p {
  color: #000000;
  font-size: 0.95rem;
  line-height: 1.7;
}

section.presentation .presentation-wrapper .slide-item {
  background: #ffffff;
  color: #000000;
  border: 0.05rem solid #e1e3eb;
  padding: 1.5rem;
  border-radius: 1.5rem;
  gap: 1.5rem;
  transition: 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

section.presentation .presentation-wrapper .slide-item > section {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

h2,
h2.heading-text,
section.qooly-info .block h2,
section.faq h2,
.applications-page-wrapper h2 {
  font-size: 2.2rem;
}

.applications-page-wrapper .app-grid .app-card {
  width: 48%;
  background: #F9FAFE;
  border: 1px solid transparent;
  padding: 1.8rem;
  border-radius: 2rem;
  transition: all 0.5s linear;
}

.applications-page-wrapper .app-grid .app-row-ad {
  display: flex;
  justify-content: center;
  width: 100%;
  flex: none;
  margin: 2rem 0;
}

.applications-page-wrapper .app-row-ad .qooly-ad {
  max-width: 100%;
  margin: 0;
}

.applications-page-wrapper .applications-page-ex .app-title {
  font-size: 2.2rem;
  text-align: left;
  font-weight: 600;
  margin-bottom: 0rem;
  line-height: 1.5;
}

.applications-page-wrapper .applications-page-ex .app-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #3e3e3e;
  margin-bottom: 1rem;
}

.applications-page-wrapper .app-grid .button.outline-btn {
  border: 1px solid #c5c8ca;
  padding: 1.2rem 0rem;
  font-weight: 500;
  text-align: center;
  font-size: 0.8rem;
  border-radius: 0.6rem;
  transition: all 0.3s linear;
  width: 19rem;
  background: #fff;
}

section.faq h2 {
  margin-top: 5.5rem;
  text-align: center;
  font-weight: 600;
}

section.qooly-info .block {
  background: white;
  border-radius: 2rem;
  padding: 0;
  border: 0.05rem solid #e1e3eb;
}

.crosslinking {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding-left: 3rem;
  padding-right: 3rem;
  padding-top: 2rem;
}

.crosslinking li a {
  width: 100%;
  align-items: center;
  background: #000000;
  border-radius: 0.8rem;
  color: #fff;
  text-align: center;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.9rem;
  justify-content: center;
  padding: 1.5rem 2.25rem;
  transition: all 0.5s ease;
}

.inner-m3u8-page section.qooly-info .block:has(.crosslinking) {
  padding: 0rem 0 3rem 0;
}

section.qooly-info .block .subtitle {
  margin-top: 1.5rem;
  max-width: unset;
  padding-left: 3rem;
  padding-right: 3rem;
  font-weight: 400;
  line-height: 1.7;
  font-size: 1rem;
}

section.qooly-info .block .slider-wrapper {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

section.qooly-info .block .slider {
  margin: 2rem 0 3rem 0;
  display: flex;
  gap: 1rem;
  justify-content: center;
  position: relative;
}

section.qooly-info {
  margin-top: 5rem;
}

section.qooly-info::before {
  background: white;
}

@media (min-width: 701px) {
  .main-content .side-blocks.how-to-steps,
  .main-content .side-blocks.welcome-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 1fr;
  }
}

.qooly-ad {
  width: 728px;
  max-width: calc(100% - 32px);
  height: 90px;
  min-height: 90px;
  margin: 0 auto 4.6875rem;
  background: #F9FAFE;
  text-align: center;
  overflow: hidden;
  flex: none;
}

.qooly-ad.qooly-ad--before-faq {
  margin: 4rem auto;
}

.main-content section.qooly-info:has(+ .qooly-ad--before-faq) > .container,
.main-content section.two-text-one:has(+ .qooly-ad--before-faq) > .container {
  padding-bottom: 0 !important;
}

section.two-text-one:has(+ .qooly-ad--before-faq) {
  padding-bottom: 0;
}

.main-content .qooly-ad--before-faq + section.faq > .container {
  padding-top: 0 !important;
}

.qooly-ad--before-faq + section.faq h2 {
  margin-top: 0;
}

.qooly-ad-rail {
  display: none;
  position: fixed;
  top: calc(var(--site-header-height) + max(40px, var(--site-breadcrumbs-height)) + 20px);
  width: 160px;
  height: 600px;
  background: #F9FAFE;
  z-index: 10;
}

@media (min-width: 993px) {
  .main-content .image-downloader-hero > .text-holder h1,
  .main-content .screenshot-tool-hero > .text-holder h2 {
    width: 125%;
    max-width: calc(100vw - 48px);
  }

  .main-content {
    width: min(var(--site-content-width), calc(100% - 48px));
    margin-inline: auto;
  }
  .main-content .container {
    width: 100%;
    max-width: 100%;
  }
}

/* Reserve both rails and a 24px gap. Never cover the content on smaller screens. */
@media (min-width: 1280px) {
  body:has(.qooly-ad-rail) {
    --site-content-width: min(calc(78rem - 60px), calc(var(--site-shell-width) - 368px), calc(100% - 400px));
  }
  .qooly-ad-rail { display: block; }
  .qooly-ad-rail--left { left: max(16px, calc((100% - var(--site-shell-width)) / 2)); }
  .qooly-ad-rail--right { right: max(16px, calc((100% - var(--site-shell-width)) / 2)); }
}

@media (max-width: 992px) {
  .main-content .container.merge-page > h1,
  .main-content .container.change-speed-page > h1,
  .main-content .container.reduce-video-page > h1 {
    width: 100%;
    text-align: center;
  }

  .applications-page-wrapper .app-grid .app-card { width: 100%; }
  .applications-page-wrapper .app-grid .button.outline-btn { width: 11rem; }
  :root { --site-header-height: 71px; }
  .main-footer > .container { width: calc(100% - 32px); }
  .qooly-ad { margin-bottom: 2rem; }
}
