/* Fotor Photo Editor 1.0.188 — compact mobile editor topbar.
   Scope is intentionally limited to the editor-owned ESG topbar. */

@media (max-width: 520px) {
  #fotor-root .esg-topbar__inner,
  .esg-topbar__inner {
    gap: 6px !important;
    padding-inline: 7px !important;
  }

  #fotor-root .esg-topbar__left,
  .esg-topbar__left {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    gap: 0 !important;
  }

  #fotor-root .esg-topbar__brand,
  .esg-topbar__brand {
    flex: 0 0 auto !important;
    gap: 0 !important;
    padding: 7px !important;
  }

  #fotor-root .esg-topbar__brand-text,
  .esg-topbar__brand-text {
    display: none !important;
  }

  #fotor-root .esg-topbar__brand-icon,
  .esg-topbar__brand-icon {
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
  }

  #fotor-root .esg-topbar__right,
  .esg-topbar__right {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }

  #fotor-root .esg-topbar__right > *,
  .esg-topbar__right > * {
    flex-shrink: 0 !important;
  }

  #fotor-root .esg-lang__toggle,
  .esg-lang__toggle {
    min-width: 44px !important;
    padding-inline: 8px !important;
  }

  #fotor-root .esg-balance,
  .esg-balance {
    min-width: 44px !important;
    padding-inline: 8px !important;
  }

  #fotor-root .esg-auth--primary,
  #fotor-root .esg-auth--button.esg-auth--primary,
  .esg-auth--primary,
  .esg-auth--button.esg-auth--primary {
    white-space: nowrap !important;
    padding-inline: 11px !important;
  }

  #fotor-root .esg-burger,
  .esg-burger {
    flex: 0 0 auto !important;
  }
}

/* Give 360–389px phones a little extra breathing room without hiding any
   functional control. Registration remains the primary CTA. */
@media (max-width: 389px) {
  #fotor-root .esg-topbar__inner,
  .esg-topbar__inner {
    gap: 4px !important;
    padding-inline: 5px !important;
  }

  #fotor-root .esg-topbar__right,
  .esg-topbar__right {
    gap: 4px !important;
  }

  #fotor-root .esg-topbar__brand,
  .esg-topbar__brand {
    padding-inline: 5px !important;
  }

  #fotor-root .esg-lang__toggle,
  .esg-lang__toggle,
  #fotor-root .esg-balance,
  .esg-balance {
    min-width: 40px !important;
    padding-inline: 6px !important;
  }

  #fotor-root .esg-auth--primary,
  #fotor-root .esg-auth--button.esg-auth--primary,
  .esg-auth--primary,
  .esg-auth--button.esg-auth--primary {
    padding-inline: 9px !important;
    font-size: 13px !important;
  }
}
