/* AvaClik v0.5.75: MOBILE light-theme corrections on actual portal DOM nodes.
   Previous #fotor-root-only overrides missed dialogs mounted under body.
   All rules are strictly light-theme and max 768px; do not recolor photos, textures or dark mode. */
@media (max-width:768px) {
  /* Remove background: one-line hint and primary action. */
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(
    .mobile-tool-content--remove-bg,.left-panel--tool-remove-bg,.m-native-panel,
    .m-native-row,.m-native-block
  ) :is(p,small,.m-native-hint,.m-native-desc,.m-native-text,.m-native-note,.mtool-hint,span:not([class])) {
    color:#404651!important;-webkit-text-fill-color:#404651!important;
    opacity:1!important;text-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(
    .m-native-primary,.remove-bg-btn,.m-native-row button:not(:disabled)
  ) {background:#292d34!important;background-image:none!important;border-color:#292d34!important;color:#fff!important;-webkit-text-fill-color:#fff!important;}
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(
    .left-panel--tool-remove-bg,.mobile-tool-content--remove-bg,.m-native-panel
  ) {background:#fff!important;border-color:#d5d8de!important;}

  /* Describe pose/outfit: the React component is a direct child of body. */
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet {--sgp-line:#d2d6dc;--sgp-panel-2:#f4f5f7;--sgp-text:#24272d;--sgp-muted:#66707b;--sgp-blue:#30343b;--sgp-blue-soft:#e0e3e8;color-scheme:light!important;}
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet .sg-prompt-sheet__card,
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet .sg-prompt-editor {background:#fff!important;background-image:none!important;border-color:#d0d3d9!important;color:#24272d!important;box-shadow:0 24px 50px #0004!important;}
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet .sg-prompt-editor__head {background:#fff!important;background-image:none!important;border-bottom:1px solid #d4d7df!important;}
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet :is(.sg-prompt-editor__title,.sg-prompt-select-wrap>span,.sg-prompt-editor label,.sg-prompt-editor strong) {color:#252932!important;-webkit-text-fill-color:#252932!important;opacity:1!important;text-shadow:none!important;}
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet :is(.sg-prompt-editor__hint,.sg-prompt-editor small,.sg-prompt-note) {color:#626873!important;-webkit-text-fill-color:#626873!important;opacity:1!important;text-shadow:none!important;}
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet :is(.sg-prompt-editor__close,.sg168-preset-option,.sg169-preset-option,.sg-prompt-chip,.sg-prompt-select,.sg-prompt-textarea,.sg-prompt-editor textarea,.sg-prompt-note) {background:#f3f4f6!important;background-image:none!important;border-color:#cfd3da!important;color:#242932!important;-webkit-text-fill-color:#242932!important;box-shadow:none!important;}
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet :is(.sg168-preset-option.is-active,.sg169-preset-option.is-active,.sg-prompt-chip.active,[aria-pressed="true"].sg-prompt-chip) {background:#e0e3e8!important;border-color:#686f79!important;color:#20242b!important;-webkit-text-fill-color:#20242b!important;box-shadow:inset 0 0 0 1px #686f79!important;}
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet :is(.sg168-preset-option.is-active,.sg169-preset-option.is-active)::before {background:#252a32!important;box-shadow:none!important;}
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet :is(.sg-prompt-textarea,.sg-prompt-editor textarea)::placeholder {color:#717782!important;-webkit-text-fill-color:#717782!important;opacity:1!important;}
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet .sg-prompt-sheet-apply {background:#292d34!important;border-color:#292d34!important;color:#fff!important;-webkit-text-fill-color:#fff!important;}
  html[data-ava-editor-theme="light"] body > .sg-prompt-sheet .sg-prompt-sheet-apply:disabled {background:#e5e7ea!important;border-color:#d4d7db!important;color:#68707c!important;-webkit-text-fill-color:#68707c!important;}

  /* Outfit, hair and beard floating color menus: same light palette, keep real color dots and texture backgrounds. */
  html[data-ava-editor-theme="light"] body :is(.color-dd-menu,.color-dd-list) {background:#fff!important;background-image:none!important;border-color:#d3d6dc!important;color:#242831!important;box-shadow:0 18px 48px #0003!important;}
  html[data-ava-editor-theme="light"] body .color-dd-menu .color-dd-item {background:#f4f5f7!important;background-image:none!important;border-color:#d9dce2!important;color:#262a32!important;-webkit-text-fill-color:#262a32!important;box-shadow:none!important;}
  html[data-ava-editor-theme="light"] body .color-dd-menu .color-dd-item:is(.active,.selected,.is-selected,[aria-selected="true"]) {background:#e1e4e8!important;border-color:#767e8b!important;color:#20252c!important;-webkit-text-fill-color:#20252c!important;}
  html[data-ava-editor-theme="light"] body .color-dd-menu .color-dd-item :is(.color-dd-item-text,.color-dd-label,span:not(.color-dd-dot),b,strong) {color:#262a32!important;-webkit-text-fill-color:#262a32!important;opacity:1!important;text-shadow:none!important;}
  html[data-ava-editor-theme="light"] body .color-dd-menu .color-dd-item .color-dd-check {background:#292d34!important;color:#fff!important;-webkit-text-fill-color:#fff!important;}
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .sg256-beard-texture-picker :is(.color-dd-menu,.color-dd-list) {background:#fff!important;border-color:#d3d6dc!important;}
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .sg256-beard-texture-picker .color-dd-item {background:#f4f5f7!important;border-color:#d9dce2!important;color:#262a32!important;}
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .sg256-beard-texture-picker .color-dd-item.active {background:#e1e4e8!important;border-color:#767e8b!important;}
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .sg256-beard-texture-picker .color-dd-item-text {color:#262a32!important;-webkit-text-fill-color:#262a32!important;}

  /* Hair color palette overlay: close button, title, hint, textures' CARD chrome only. */
  html[data-ava-editor-theme="light"] body > .hair-color-modal-backdrop .hair-color-modal,
  html[data-ava-editor-theme="light"] body > .hair-color-modal-backdrop .sg256-texture-picker {background:#fff!important;background-image:none!important;border-color:#cfd3da!important;color:#242831!important;}
  html[data-ava-editor-theme="light"] body > .hair-color-modal-backdrop :is(.hair-color-modal__header,.hair-color-modal__grid,.hair-color-modal__rgb) {background:#fff!important;border-color:#d3d6dd!important;}
  html[data-ava-editor-theme="light"] body > .hair-color-modal-backdrop :is(.hair-color-modal__title,.hair-color-modal__swatch b,.hair-color-modal__rgb label) {color:#252a32!important;-webkit-text-fill-color:#252a32!important;opacity:1!important;}
  html[data-ava-editor-theme="light"] body > .hair-color-modal-backdrop :is(.hair-color-modal__hint,.sg256-custom-color-toggle b) {color:#6a717b!important;-webkit-text-fill-color:#6a717b!important;opacity:1!important;}
  html[data-ava-editor-theme="light"] body > .hair-color-modal-backdrop :is(.hair-color-modal__swatch,.sg256-custom-color-toggle) {background:#f4f5f7!important;background-image:none!important;border-color:#d3d7dc!important;box-shadow:none!important;}
  html[data-ava-editor-theme="light"] body > .hair-color-modal-backdrop .hair-color-modal__swatch.active {background:#e2e5e9!important;border-color:#656d78!important;}
  html[data-ava-editor-theme="light"] body > .hair-color-modal-backdrop .hair-color-modal__close {background:#f0f2f4!important;border:1px solid #cbd1d9!important;color:#252a32!important;}
  /* NOTE: swatch > span stores the real color texture image and must remain untouched. */
}
