/* 1.0.310: preserve UI hierarchy without moving or inserting React children. */
@media (min-width: 769px) {
  #fotor-root .editor-shell:not(.is-mobile) .left-rail .rail-list {
    display: flex !important;
    flex-direction: column !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .rail-btn[data-section="agent"] { order: 10 !important; }
  #fotor-root .editor-shell:not(.is-mobile) .rail-btn[data-section="popular"] { order: 20 !important; }
  #fotor-root .editor-shell:not(.is-mobile) .rail-btn[data-section="appearance"] { order: 30 !important; }
  #fotor-root .editor-shell:not(.is-mobile) .rail-btn[data-section="scene"] { order: 40 !important; }
  #fotor-root .editor-shell:not(.is-mobile) .rail-btn[data-section="effects"] { order: 50 !important; }
  #fotor-root .editor-shell:not(.is-mobile) .rail-btn[data-section="ai-text-image"] { order: 60 !important; }
  #fotor-root .editor-shell:not(.is-mobile) .rail-btn[data-section="free"] { order: 70 !important; }
  #fotor-root .editor-shell:not(.is-mobile) .rail-btn[data-section="adult"] { order: 80 !important; }
  #fotor-root .editor-shell:not(.is-mobile) .rail-btn[data-section="sales"] { order: 90 !important; }
  #fotor-root .editor-shell:not(.is-mobile) .rail-btn[data-section="design"] { order: 100 !important; }
  #fotor-root .editor-shell:not(.is-mobile) .rail-btn[data-section="adjust"] { order: 110 !important; }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-header::before {
    content: "Изображения" !important;
    min-width: 0 !important;
    color: rgba(229,234,242,.78) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  html[data-sg-editor-lang="en"] #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-header::before {
    content: "Images" !important;
  }

  html[data-sg-editor-lang="uk"] #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-header::before {
    content: "Зображення" !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .ws-top-actions .sg302-download-action::after {
    content: attr(data-label) !important;
    display: inline !important;
    color: inherit !important;
    font-size: 11px !important;
    font-weight: 720 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-badge:not(.sg301-multiple-versions) {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* The injected overflow menu is disabled. Keep native React actions visible
     and compact so every hit area corresponds to a visible control. */
  #fotor-root .editor-shell.is-mobile .ws-top-actions > .ws-action:not(.primary) {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
  }

  #fotor-root .editor-shell.is-mobile .ws-top-actions .sg303-actions-menu {
    display: none !important;
  }
}
