/* AvaClik Editor 0.5.77 — final mobile color menus, dark create-image selects,
   and slightly rounder top tool strip. Pure visual overrides only. */
@media (max-width: 768px) {
  /* 1) Light theme: force hair/beard/outfit color dropdowns to use the
     same white / light-gray palette as the rest of the mobile UI. */
  html[data-ava-editor-theme="light"] body :is(.color-dd,.color-dd-menu,.color-dd-list),
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(.color-dd,.color-dd-menu,.color-dd-list) {
    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"] body :is(.color-dd-trigger,.color-dd-item,.color-dd-extra),
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(.color-dd-trigger,.color-dd-item,.color-dd-extra) {
    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;
    text-shadow: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
  }
  html[data-ava-editor-theme="light"] body :is(.color-dd-item.active,.color-dd-item.selected,.color-dd-item.is-selected,.color-dd-item[aria-selected="true"],.color-dd-extra.active),
  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"],.color-dd-extra.active) {
    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;
    box-shadow: inset 0 0 0 1px var(--ava-m-stroke) !important;
  }
  html[data-ava-editor-theme="light"] body :is(.color-dd-trigger-text,.color-dd-item-text,.color-dd-check,.color-dd-chevron,.color-dd-label,.color-dd-extra > span:not(.color-dd-dot)),
  html[data-ava-editor-theme="light"] #fotor-root .editor-shell.is-mobile :is(.color-dd-trigger-text,.color-dd-item-text,.color-dd-check,.color-dd-chevron,.color-dd-label,.color-dd-extra > span:not(.color-dd-dot)) {
    color: var(--ava-m-text) !important;
    -webkit-text-fill-color: var(--ava-m-text) !important;
    opacity: 1 !important;
    text-shadow: none !important;
  }

  /* 2) Dark theme: neutralize the burgundy native dropdown styling in
     Create image for Quality / Aspect ratio. */
  html[data-ava-editor-theme="dark"] :is(#fotor-root, body) :is(.text-image-popup,.text-image-page,.ti-mobile-prompt-sheet) select,
  html[data-ava-editor-theme="dark"] :is(#fotor-root, body) .text-image-popup :is(.ti-grid,.ti-quality,.ti-field,.ti-hot-aspect--toolbar) select {
    background: var(--ava-m-surface) !important;
    background-image: none !important;
    border: 1px solid 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: dark !important;
    accent-color: var(--ava-m-accent) !important;
  }
  html[data-ava-editor-theme="dark"] :is(#fotor-root, body) :is(.text-image-popup,.text-image-page,.ti-mobile-prompt-sheet) select :is(option,optgroup) {
    background: var(--ava-m-panel) !important;
    color: var(--ava-m-text) !important;
    -webkit-text-fill-color: var(--ava-m-text) !important;
  }
  html[data-ava-editor-theme="dark"] :is(#fotor-root, body) :is(.text-image-popup,.text-image-page,.ti-mobile-prompt-sheet) select option:checked {
    background: var(--ava-m-selected) !important;
    color: var(--ava-m-text) !important;
    -webkit-text-fill-color: var(--ava-m-text) !important;
  }

  /* 3) Slightly rounder top strip above the preset rail. */
  html[data-ava-editor-theme] #fotor-root .editor-shell.is-mobile:not(.sg-mobile-panel-collapsed) .mtool-top-controls {
    border-radius: 14px !important;
    overflow: visible !important;
    background-clip: padding-box !important;
  }
  html[data-ava-editor-theme] #fotor-root .editor-shell.is-mobile .mtool-top-controls :is(.mtool-top-group--left,.mtool-top-group--right) {
    border-radius: 12px !important;
  }
  html[data-ava-editor-theme] #fotor-root .editor-shell.is-mobile .mtool-top-controls .mtool-top-btn:first-child {
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
  }
  html[data-ava-editor-theme] #fotor-root .editor-shell.is-mobile .mtool-top-controls .mtool-top-btn:last-child {
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
  }
}


/* v0.5.102: light mobile utility menus; preserve all photo and swatch colors. */
@media (max-width:768px) {
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .mtool-popover {
    background:#fff!important; background-image:none!important; border-color:#d5d8de!important;
    color:#24272d!important; box-shadow:0 12px 30px #0003!important; color-scheme:light!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .mtool-popover .mtool-popover-item {
    background:#f5f6f8!important; background-image:none!important; border-color:#d5d8de!important;
    color:#24272d!important; -webkit-text-fill-color:#24272d!important; box-shadow:none!important; text-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .mtool-popover .mtool-popover-item:is(.active,.selected,.is-selected,[aria-selected="true"],[aria-pressed="true"]) {
    background:#e0e3e8!important; border-color:#767e8b!important; color:#24272d!important; -webkit-text-fill-color:#24272d!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .mtool-popover .mtool-popover-item .mtool-popover-item-label,
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .mtool-popover .mtool-popover-item.active::after {
    color:#24272d!important; -webkit-text-fill-color:#24272d!important; opacity:1!important; text-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .ws-top-actions .sg303-more-trigger {
    background:#f5f6f8!important; background-image:none!important; border-color:#d5d8de!important; color:#24272d!important; -webkit-text-fill-color:#24272d!important; box-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .ws-top-actions .sg303-actions-menu.is-open .sg303-more-trigger {
    background:#e0e3e8!important; border-color:#767e8b!important; color:#24272d!important; outline-color:#767e8b!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .ws-top-actions .sg303-actions-popup,
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .workspace .ws-download-popup {
    background:#fff!important; background-image:none!important; border-color:#d5d8de!important; color:#24272d!important; box-shadow:0 12px 30px #0003!important; color-scheme:light!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .sg303-actions-popup .sg303-actions-title {
    color:#606873!important; -webkit-text-fill-color:#606873!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .sg303-actions-popup .sg303-menu-action,
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .sg303-actions-popup .sg303-menu-action :is(span,svg) {
    color:#24272d!important; -webkit-text-fill-color:#24272d!important; text-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .sg303-actions-popup .sg303-menu-action {background:#fff!important; background-image:none!important;}
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .sg303-actions-popup .sg303-menu-action:is(:hover,:active):not(:disabled) {background:#e9ebee!important;}
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .sg303-actions-popup .sg303-menu-action--clear,
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .sg303-actions-popup .sg303-menu-action--clear :is(span,svg) {
    color:#a42636!important; -webkit-text-fill-color:#a42636!important; border-top-color:#d5d8de!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .workspace .ws-download-popup .ws-download-option {
    background:#f5f6f8!important; background-image:none!important; border-color:#d5d8de!important; color:#24272d!important; -webkit-text-fill-color:#24272d!important; box-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .workspace .ws-download-popup .ws-download-option:is(:hover,:active) {background:#e0e3e8!important;}
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .workspace .ws-download-popup .ws-download-option__format {color:#24272d!important; -webkit-text-fill-color:#24272d!important; opacity:1!important;}
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile .workspace .ws-download-popup .ws-download-option__hint {color:#606873!important; -webkit-text-fill-color:#606873!important; opacity:1!important;}
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile.sg324-mobile-add-person-direct .mobile-addperson-refs .ai-refs-btn {
    background:#f5f6f8!important; background-image:none!important; border-color:#a7aeb8!important;
    color:transparent!important; -webkit-text-fill-color:transparent!important;
  }
  html[data-ava-editor-theme="light"] body #fotor-root .editor-shell.is-mobile.sg324-mobile-add-person-direct .mobile-addperson-refs .ai-refs-btn::before {
    color:#24272d!important; -webkit-text-fill-color:#24272d!important; opacity:1!important; text-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] body .ava-mobile-hold-preview {background:rgba(17,22,29,.55)!important;}
  html[data-ava-editor-theme="light"] body .ava-mobile-hold-preview > .ava-mobile-hold-preview__box {
    background:#fff!important; background-image:none!important; border-color:#d5d8de!important; box-shadow:0 18px 55px #0004!important;
  }
  html[data-ava-editor-theme="light"] body .ava-mobile-hold-preview .ava-mobile-hold-preview__caption {
    color:#24272d!important; -webkit-text-fill-color:#24272d!important; text-shadow:none!important;
  }
}

/* v0.5.103 — The mobile More menu is mounted directly under body, outside React. */
@media (max-width: 768px) {
  html[data-ava-editor-theme="light"] body > .sg316-mobile-actions .sg316-more {
    background:#f5f6f8!important; background-image:none!important;
    border-color:#c7ccd4!important; color:#24272d!important;
    -webkit-text-fill-color:#24272d!important; box-shadow:none!important;
    color-scheme:light!important;
  }
  html[data-ava-editor-theme="light"] body > .sg316-mobile-actions.is-open .sg316-more {
    background:#e0e3e8!important; border-color:#89929f!important; outline-color:#89929f!important;
  }
  html[data-ava-editor-theme="light"] body > .sg316-mobile-actions .sg316-actions-popup {
    background:#fff!important; background-image:none!important;
    border-color:#d5d8de!important; color:#24272d!important;
    box-shadow:0 12px 30px #0003!important; color-scheme:light!important;
  }
  html[data-ava-editor-theme="light"] body > .sg316-mobile-actions .sg316-menu-action {
    background:transparent!important; background-image:none!important;
    color:#24272d!important; -webkit-text-fill-color:#24272d!important;
    text-shadow:none!important; box-shadow:none!important;
  }
  html[data-ava-editor-theme="light"] body > .sg316-mobile-actions .sg316-menu-action:is(:hover,:active,:focus-visible):not(:disabled) {
    background:#e9ebee!important;
  }
  html[data-ava-editor-theme="light"] body > .sg316-mobile-actions .sg316-menu-action--clear {
    color:#a42636!important; -webkit-text-fill-color:#a42636!important;
  }
}
