/* Fotor Photo Editor 1.0.186 — desktop gallery polish pass 3. */
@media (min-width: 769px) {
  /* Right gallery: every preview is a self-contained clipped square. */
  #fotor-root .editor-shell:not(.is-mobile) > .right-gallery,
  #fotor-root .editor-shell:not(.is-mobile) .right-gallery {
    width: 104px !important;
    flex: 0 0 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    box-sizing: border-box !important;
    padding: 10px 8px !important;
    overflow: hidden !important;
    border-left: 1px solid rgba(255,255,255,.055) !important;
    background: #090c10 !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-header {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 9px !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-add {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    border: 1px solid rgba(255,255,255,.085) !important;
    border-radius: 10px !important;
    background: #12171e !important;
    color: rgba(224,230,239,.90) !important;
    box-shadow: none !important;
  }
  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-add:hover:not(:disabled) {
    border-color: rgba(255,255,255,.14) !important;
    background: #181e26 !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-list {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 2px 3px 4px 2px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255,255,255,.13) transparent !important;
    overscroll-behavior: contain !important;
  }
  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-list::-webkit-scrollbar {
    width: 4px !important;
  }
  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-list::-webkit-scrollbar-thumb {
    border-radius: 999px !important;
    background: rgba(255,255,255,.13) !important;
  }
  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-list::-webkit-scrollbar-track {
    background: transparent !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-list > .rg-item {
    position: relative !important;
    isolation: isolate !important;
    contain: paint !important;
    flex: 0 0 auto !important;
    align-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(255,255,255,.085) !important;
    border-radius: 12px !important;
    background: #0d1117 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025) !important;
    transform: translateZ(0) !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-list > .rg-item:hover {
    border-color: rgba(255,255,255,.14) !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-list > .rg-item.active {
    border-color: rgba(77,150,246,.86) !important;
    box-shadow:
      inset 0 0 0 1px rgba(77,150,246,.30),
      inset 0 1px 0 rgba(255,255,255,.045) !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-item > img,
  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-item > picture,
  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-item > picture > img {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
    border: 0 !important;
    border-radius: 11px !important;
    clip-path: inset(0 round 11px) !important;
    transform: none !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-ph {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    border-radius: 11px !important;
    color: rgba(181,190,202,.62) !important;
    background: #0d1117 !important;
    font-size: 10px !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-processing-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    border-radius: 11px !important;
    clip-path: inset(0 round 11px) !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-del {
    top: 5px !important;
    right: 5px !important;
    z-index: 4 !important;
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    border: 1px solid rgba(255,255,255,.11) !important;
    border-radius: 7px !important;
    background: rgba(8,11,15,.84) !important;
    color: rgba(235,239,245,.88) !important;
    box-shadow: none !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
  }
  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-item:hover .rg-del,
  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-item.active .rg-del {
    opacity: 1 !important;
    transform: none !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-badge {
    right: 5px !important;
    bottom: 5px !important;
    z-index: 4 !important;
    max-width: calc(100% - 10px) !important;
    padding: 2px 5px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 999px !important;
    background: rgba(7,10,14,.82) !important;
    color: rgba(237,241,247,.90) !important;
    font-size: 8px !important;
    font-weight: 760 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    box-shadow: none !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
  }

  /* Keep the gallery from forcing the workspace wider on medium desktop widths. */
  @media (max-width: 1280px) {
    #fotor-root .editor-shell:not(.is-mobile) > .right-gallery,
    #fotor-root .editor-shell:not(.is-mobile) .right-gallery {
      width: 94px !important;
      flex-basis: 94px !important;
      min-width: 94px !important;
      max-width: 94px !important;
      padding-left: 7px !important;
      padding-right: 7px !important;
    }
  }

  /* Preset/image cards: same clipping rules as gallery thumbnails. */
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .preset-card,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .m-ai-card {
    box-sizing: border-box !important;
    overflow: hidden !important;
    isolation: isolate !important;
    contain: paint !important;
  }
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .preset-card img,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile img,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .m-ai-card img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
  }

  /* Sticky generation footers: quiet, consistent edge separation. */
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-footer,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .mobile-tool-footer,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-correction-footer,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .sg-product-footer {
    box-sizing: border-box !important;
    border-top: 1px solid rgba(255,255,255,.055) !important;
    background: rgba(11,14,19,.98) !important;
    box-shadow: 0 -8px 20px rgba(0,0,0,.16) !important;
  }
}
