/* AvaClik 0.5.74 — light mobile theme: final pass for standalone dialogs and controls.
 * Only UI chrome is recolored; user images and preset artwork are not affected.
 * Dark theme and desktop remain untouched.
 */
@media (max-width:768px) {
  /* 1. The tool action bar and status texts are composed outside the regular
     sheet; older CSS gives them white text on the new white background. */
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(
    .mtool-top-controls,.mtool-top-controls__title,.mtool-title,.mobile-tool-title,
    .mtool-top-controls__label,.ai-hair-title,.ai-refs-title,
    .sg-add-person-reference__hint,.sg-add-person-reference .ai-refs-title
  ) {
    color:var(--ava-m-text)!important;
    -webkit-text-fill-color:var(--ava-m-text)!important;
    text-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile .mtool-top-controls :is(
    .mtool-title,.mobile-tool-title,small,.mtool-top-controls__title,.mtool-top-controls__label
  ) {color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;opacity:1!important;text-shadow:none!important;}
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(
    .ai-hair-footer-hint,.ai-refs-hint,.sg-add-person-reference__hint,
    .sg-add-person-page .ai-hair-top p,.sg-add-person-page .ai-hair-top small,
    .mobile-tool-content--remove-bg p,.mobile-tool-content--remove-bg small
  ) {color:var(--ava-m-muted)!important;-webkit-text-fill-color:var(--ava-m-muted)!important;opacity:1!important;text-shadow:none!important;}
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(
    .mtool-top-btn--apply,.mobile-apply-btn,.ai-hair-run,.ai-correction-run
  ):disabled,
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(
    .mtool-top-btn--apply,.mobile-apply-btn,.ai-hair-run,.ai-correction-run
  ):disabled :is(span,small,strong) {
    opacity:1!important;
    background:var(--ava-m-disabled)!important;
    border-color:var(--ava-m-stroke)!important;
    color:#636a76!important;
    -webkit-text-fill-color:#636a76!important;
    text-shadow:none!important;
  }

  /* 2. Native create-image selects: browser popups must use a *light*
     color-scheme too, not the hard-coded dark option palette. */
  html[data-ava-editor-theme="light"] #fotor-root :is(
    .text-image-popup,.text-image-page,.ti-style-sheet,.ti-mobile-prompt-sheet
  ) select,
  html[data-ava-editor-theme="light"] #fotor-root .text-image-popup :is(
    .ti-grid select,.ti-field select,.ti-hot-aspect select,.ti-quality select
  ) {
    color-scheme:light!important;
    background:#f5f6f8!important;
    background-image:none!important;
    color:#20252d!important;
    -webkit-text-fill-color:#20252d!important;
    border:1px solid #cbd0d8!important;
    box-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .text-image-popup select :is(option,optgroup),
  html[data-ava-editor-theme="light"] #fotor-root .text-image-page select :is(option,optgroup) {
    color-scheme:light!important;
    background:#fff!important;
    color:#20252d!important;
    -webkit-text-fill-color:#20252d!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .text-image-popup select option:checked,
  html[data-ava-editor-theme="light"] #fotor-root .text-image-page select option:checked {
    background:#dce0e6!important;color:#171b20!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .text-image-popup :is(.ti-field>span,.ti-quality>span,.ti-head p,.ti-presets-intro,.ti-presets-intro strong) {
    color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;opacity:1!important;
  }

  /* 3. Pose / Outfit by description bottom-sheets: remove black header,
     blue selection and dark helper band; keep layout and text unchanged. */
  html[data-ava-editor-theme="light"] #fotor-root :is(.sg-prompt-sheet__card,.sg-prompt-editor,.sg-prompt-editor__head) {
    background:var(--ava-m-panel)!important;background-image:none!important;
    border-color:var(--ava-m-stroke)!important;color:var(--ava-m-text)!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .sg-prompt-editor__head {
    border-bottom:1px solid var(--ava-m-stroke)!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root :is(
    .sg-prompt-editor__title,.sg-prompt-editor__title span,.sg-prompt-select-wrap>span,
    .sg-prompt-chip,.sg-prompt-editor label,.sg-prompt-editor strong
  ) {
    color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;
    text-shadow:none!important;opacity:1!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root :is(
    .sg-prompt-editor__hint,.sg-prompt-note,.sg-prompt-editor small
  ) {
    color:var(--ava-m-muted)!important;-webkit-text-fill-color:var(--ava-m-muted)!important;
    text-shadow:none!important;opacity:1!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root :is(
    .sg-prompt-chip,.sg-prompt-editor__close,.sg-prompt-select,
    .sg-prompt-textarea,.sg-prompt-editor textarea,.sg-prompt-note
  ) {
    background:var(--ava-m-surface)!important;background-image:none!important;
    border-color:var(--ava-m-stroke)!important;
    box-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root :is(
    .sg-prompt-chip.active,.sg-prompt-chip[aria-pressed="true"],.sg-prompt-chip[aria-selected="true"]
  ) {
    background:var(--ava-m-selected)!important;
    border-color:var(--ava-m-accent)!important;
    color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root :is(
    .sg-prompt-textarea,.sg-prompt-select,.sg-prompt-editor textarea
  ) {
    color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;
    color-scheme:light!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root :is(.sg-prompt-textarea,.sg-prompt-editor textarea)::placeholder {
    color:var(--ava-m-muted)!important;-webkit-text-fill-color:var(--ava-m-muted)!important;opacity:1!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .sg-prompt-select option {
    background:#fff!important;color:#222!important;color-scheme:light!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .sg-prompt-sheet-apply {
    background:var(--ava-m-primary)!important;background-image:none!important;
    color:var(--ava-m-on-primary)!important;-webkit-text-fill-color:var(--ava-m-on-primary)!important;
    border-color:var(--ava-m-primary)!important;opacity:1!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .sg-prompt-sheet-apply:disabled {
    background:var(--ava-m-disabled)!important;
    color:#656b75!important;-webkit-text-fill-color:#656b75!important;
    border-color:var(--ava-m-stroke)!important;opacity:1!important;
  }

  /* The base mobile skin has .editor-shell.is-mobile in its selector,
     so the checked chip needs the same specificity to win. */
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile .sg-prompt-chip:is(.active,[aria-pressed="true"],[aria-selected="true"]) {
    background:var(--ava-m-selected)!important;background-image:none!important;
    border-color:var(--ava-m-accent)!important;
    color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;
  }

  /* 4. Color dropdowns in Outfit/Hair/Beard. The dots and their actual
     colors/textures are intentionally not recolored. */
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(
    .color-dd-menu,.color-dd-list,.color-dd-trigger,.color-dd-item
  ) {
    background:var(--ava-m-panel)!important;background-image:none!important;
    border-color:var(--ava-m-stroke)!important;
    color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;
    box-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(.color-dd-item.active,.color-dd-item.selected,.color-dd-item.is-selected,.color-dd-item[aria-selected="true"]) {
    background:var(--ava-m-selected)!important;
    border-color:var(--ava-m-accent)!important;
    color:var(--ava-m-text)!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(.color-dd-item-text,.color-dd-trigger span,.color-dd-item label) {
    color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;
    opacity:1!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile .color-dd-item .color-dd-check {
    background:var(--ava-m-primary)!important;color:var(--ava-m-on-primary)!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile .sg256-beard-texture-picker .color-dd-menu {
    background:var(--ava-m-panel)!important;border-color:var(--ava-m-stroke)!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile .sg256-beard-texture-picker .color-dd-item {
    background:var(--ava-m-surface)!important;border-color:var(--ava-m-stroke)!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile .sg256-beard-texture-picker .color-dd-item.active {
    background:var(--ava-m-selected)!important;border-color:var(--ava-m-accent)!important;
  }

  /* 5. Hairstyle color texture dialog and its separate reference-photo
     dialog both contain old charcoal / wine / blue UI rules. */
  html[data-ava-editor-theme="light"] body .hair-color-modal,
  html[data-ava-editor-theme="light"] body .sg256-texture-picker,
  html[data-ava-editor-theme="light"] #fotor-root .hair-color-modal {
    background:var(--ava-m-panel)!important;background-image:none!important;
    border-color:var(--ava-m-stroke)!important;color:var(--ava-m-text)!important;
  }
  html[data-ava-editor-theme="light"] body .sg256-texture-picker .hair-color-modal__header {
    border-color:var(--ava-m-stroke)!important;
  }
  html[data-ava-editor-theme="light"] body .sg256-texture-picker :is(
    .hair-color-modal__title,.hair-color-modal__swatch b,.sg256-custom-color-toggle,
    .hair-color-modal__rgb,.hair-color-modal__rgb label
  ) {
    color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;
  }
  html[data-ava-editor-theme="light"] body .sg256-texture-picker :is(.hair-color-modal__hint,.sg256-custom-color-toggle b) {
    color:var(--ava-m-muted)!important;-webkit-text-fill-color:var(--ava-m-muted)!important;
  }
  html[data-ava-editor-theme="light"] body .sg256-texture-picker :is(
    .hair-color-modal__swatch,.sg256-custom-color-toggle,.hair-color-modal__rgb
  ) {
    background:var(--ava-m-surface)!important;background-image:none!important;
    border-color:var(--ava-m-stroke)!important;box-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] body .sg256-texture-picker .hair-color-modal__swatch.active,
  html[data-ava-editor-theme="light"] body .sg256-texture-picker.sg256-rgb-open .sg256-custom-color-toggle {
    background:var(--ava-m-selected)!important;border-color:var(--ava-m-accent)!important;
  }
  html[data-ava-editor-theme="light"] body .sg256-texture-picker .hair-color-modal__swatch.active::after {
    background:var(--ava-m-primary)!important;color:var(--ava-m-on-primary)!important;
    border-color:var(--ava-m-primary)!important;
  }
  html[data-ava-editor-theme="light"] body .sg256-texture-picker .hair-color-modal__close {
    background:var(--ava-m-surface)!important;color:var(--ava-m-text)!important;border-color:var(--ava-m-stroke)!important;
  }
  html[data-ava-editor-theme="light"] body .sg256-texture-picker .hair-color-modal__swatch > span {
    /* Keep the actual color texture image in this element. */
    border-color:var(--ava-m-stroke)!important;
  }
  html[data-ava-editor-theme="light"] :is(#fotor-root,body) .hair-reference-editor,
  html[data-ava-editor-theme="light"] :is(#fotor-root,body) .hair-reference-editor :is(
    .hair-reference-editor__body,.hair-reference-editor__header,.hair-reference-editor__footer,
    .hair-reference-editor__field,.hair-reference-editor__upload
  ) {
    background:var(--ava-m-panel)!important;background-image:none!important;
    border-color:var(--ava-m-stroke)!important;color:var(--ava-m-text)!important;
  }
  html[data-ava-editor-theme="light"] :is(#fotor-root,body) .hair-reference-editor :is(
    .hair-reference-editor__title,.hair-reference-editor__label,strong,label,select
  ) {color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;}
  html[data-ava-editor-theme="light"] :is(#fotor-root,body) .hair-reference-editor :is(
    .hair-reference-editor__hint,.hair-reference-editor__help,small,p
  ) {color:var(--ava-m-muted)!important;-webkit-text-fill-color:var(--ava-m-muted)!important;}
  html[data-ava-editor-theme="light"] :is(#fotor-root,body) .hair-reference-editor :is(
    .hair-reference-editor__upload,.hair-reference-editor__select,select,.hair-reference-editor__back
  ) {
    background:var(--ava-m-surface)!important;border-color:var(--ava-m-stroke)!important;
    color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;
    box-shadow:none!important;color-scheme:light!important;
  }
  html[data-ava-editor-theme="light"] :is(#fotor-root,body) .hair-reference-editor .hair-reference-editor__run {
    background:var(--ava-m-primary)!important;background-image:none!important;
    border-color:var(--ava-m-primary)!important;color:var(--ava-m-on-primary)!important;
    -webkit-text-fill-color:var(--ava-m-on-primary)!important;
  }
  html[data-ava-editor-theme="light"] :is(#fotor-root,body) .hair-reference-editor .hair-reference-editor__run:disabled {
    background:var(--ava-m-disabled)!important;border-color:var(--ava-m-stroke)!important;
    color:var(--ava-m-on-disabled)!important;-webkit-text-fill-color:var(--ava-m-on-disabled)!important;opacity:1!important;
  }

  /* 6. Add Person and Remove BG still have nearly white instructions and
     ultra-pale dashed upload slot on their light tool sheet. */
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile .sg-add-person-page :is(
    .sg-add-person-reference,.ai-hair-top,.ai-hair-footer
  ) {
    background:var(--ava-m-panel)!important;border-color:var(--ava-m-stroke)!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile .sg-add-person-page :is(
    .ai-refs-title,.ai-refs-btn,.sg-add-person-reference__hint,.ai-refs-row,
    .ai-hair-footer [data-sg-disabled-reason]
  ) {color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;opacity:1!important;}
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile .sg-add-person-page :is(
    .ai-refs-btn,.ai-refs-upload,.ai-refs-dropzone,.ai-refs-pick
  ) {
    background:var(--ava-m-surface)!important;background-image:none!important;
    border-color:var(--ava-m-stroke)!important;
    color:var(--ava-m-text)!important;-webkit-text-fill-color:var(--ava-m-text)!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile .sg-add-person-page .ai-hair-footer[data-sg-disabled-reason]::before,
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile .mobile-tool-content--swap .ai-hair-footer[data-sg-disabled-reason]::before {
    color:var(--ava-m-muted)!important;-webkit-text-fill-color:var(--ava-m-muted)!important;opacity:1!important;
  }
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(
    .left-panel--tool-remove-bg,.left-panel--tool-ai-background
  ) :is(.mtool-hint,.ai-hair-help,.mobile-tool-hint,.mobile-tool-content p,.mobile-tool-content small) {
    color:var(--ava-m-muted)!important;-webkit-text-fill-color:var(--ava-m-muted)!important;opacity:1!important;
  }

  /* 7. Neutral selected UI feedback; no blue/pink tint in these dialogs.
     Keep pictorial thumbnails and real color indicators intact. */
  html[data-ava-editor-theme="light"] #fotor-root :is(.sg-prompt-sheet,.agent-popup,.text-image-popup) :is(
    button,select,textarea,input
  ):focus-visible,
  html[data-ava-editor-theme="light"] body .sg256-texture-picker button:focus-visible {
    outline:2px solid var(--ava-m-accent)!important;outline-offset:2px!important;
  }
}
