/* AvaClik Editor 0.5.64 — localized visual fixes only. UTF-8.
 * 1. Looks and Info menus follow editor light/dark mode.
 * 2. Preview captions overlay photos like Looks cards.
 * This stylesheet deliberately does not alter global --ava-* variables.
 */

/* All theme tokens are scoped to standalone Looks (portaled under body).
 * Neutral buttons and tabs — no pink fills or gradients in either theme. */
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane,.sg-looks-mobile-controls,.sg-looks-mobile-selection){
  --sg64-bg:#141416;--sg64-surface:#1c1d21;--sg64-raised:#25262b;
  --sg64-border:#383940;--sg64-text:#f5f4f6;--sg64-muted:#b4b1b9;
  --sg64-hover:#303139;--sg64-selected:#3b3d44;--sg64-focus:#c1c4cc;
  color-scheme:dark;
}
html[data-ava-editor-theme="light"] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane,.sg-looks-mobile-controls,.sg-looks-mobile-selection){
  --sg64-bg:#fffdfa;--sg64-surface:#f7f3f1;--sg64-raised:#f0eae7;
  --sg64-border:#e3d9d5;--sg64-text:#292224;--sg64-muted:#71676c;
  --sg64-hover:#eae5e2;--sg64-selected:#ded8d5;--sg64-focus:#696569;
  color-scheme:light;
}
/* Panel and its descendants previously had multiple hardcoded dark layers. */
html[data-ava-editor-theme] body.sg-looks-active > .sg-looks-desktop-pane,
html[data-ava-editor-theme] body.sg-looks-active > .sg-looks-mobile-pane{
  background:var(--sg64-bg)!important;
  border-color:var(--sg64-border)!important;
  color:var(--sg64-text)!important;
}
html[data-ava-editor-theme] body.sg-looks-active > :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane)
  :is(.left-panel-header,.left-panel-body,.ai-hair-page,.ai-hair-scroll,.sg-looks-custom-view,.mobile-tool-page,.mobile-tool-content){
  background:var(--sg64-bg)!important;
  color:var(--sg64-text)!important;
  border-color:var(--sg64-border)!important;
}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane)
  :is(.lp-title,.sg-looks-custom-upload-caption,.sg-looks-custom-notes-label){color:var(--sg64-text)!important}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane)
  :is(.lp-subtitle,.sg-looks-custom-hint){color:var(--sg64-muted)!important;opacity:1!important}
html[data-ava-editor-theme] .sg-looks-desktop-pane .left-panel-header{border-bottom:1px solid var(--sg64-border)!important}
html[data-ava-editor-theme] .sg-looks-desktop-pane :is(.lp-back,.lp-close){
  background:var(--sg64-surface)!important;border-color:var(--sg64-border)!important;
  color:var(--sg64-text)!important;box-shadow:none!important;
}
html[data-ava-editor-theme] .sg-looks-desktop-pane :is(.lp-back,.lp-close):hover{background:var(--sg64-hover)!important}
/* Tabs: restrained two-state neutral cards (not pink). */
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane) .sg-looks-mode-tabs{
  background:var(--sg64-bg)!important;border-bottom:1px solid var(--sg64-border)!important;
}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane) .sg-looks-mode-tab{
  background:var(--sg64-surface)!important;border:1px solid var(--sg64-border)!important;
  color:var(--sg64-muted)!important;box-shadow:none!important;
}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane) .sg-looks-mode-tab:hover{background:var(--sg64-hover)!important;color:var(--sg64-text)!important}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane) .sg-looks-mode-tab.active{
  background:var(--sg64-selected)!important;border-color:var(--sg64-focus)!important;
  color:var(--sg64-text)!important;box-shadow:none!important;
}
/* Custom reference upload and notes: proper contrast in light mode. */
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane) .sg-looks-custom-upload{
  background:var(--sg64-surface)!important;color:var(--sg64-text)!important;
  border:1px dashed var(--sg64-border)!important;box-shadow:none!important;
}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane) .sg-looks-custom-upload:hover{background:var(--sg64-hover)!important}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane) .sg-looks-custom-preview{
  border-color:var(--sg64-border)!important;background:var(--sg64-raised)!important;
}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane) .sg-looks-custom-notes{
  background:var(--sg64-surface)!important;color:var(--sg64-text)!important;
  border:1px solid var(--sg64-border)!important;box-shadow:none!important;
}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane) .sg-looks-custom-notes::placeholder{color:var(--sg64-muted)!important;opacity:1!important}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane) .sg-looks-custom-notes:focus{outline:2px solid var(--sg64-focus)!important;outline-offset:1px!important}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane) .sg-looks-custom-clear{color:var(--sg64-text)!important}
/* Preset cards always have neutral surrounding surfaces. Captions stay
   dark on the image itself, so they remain readable with both themes. */
html[data-ava-editor-theme] .sg-looks-desktop-pane .sg-looks-tile{
  background:var(--sg64-surface)!important;border-color:var(--sg64-border)!important;color:var(--sg64-text)!important;
}
html[data-ava-editor-theme] .sg-looks-desktop-pane .sg-looks-tile.active{
  border-color:var(--sg64-focus)!important;box-shadow:inset 0 0 0 1px var(--sg64-focus)!important;
}
html[data-ava-editor-theme] .sg-looks-desktop-pane .sg-looks-tile > .ai-hair-title{
  color:#fff!important;background:linear-gradient(180deg,rgba(31,31,37,.91),rgba(8,9,12,.94))!important;
  border:1px solid rgba(255,255,255,.16)!important;
}
html[data-ava-editor-theme] .sg-looks-desktop-pane .ai-hair-footer{
  background:var(--sg64-bg)!important;border-color:var(--sg64-border)!important;color:var(--sg64-text)!important;
}
html[data-ava-editor-theme] .sg-looks-desktop-pane .sg-looks-format{
  background:var(--sg64-surface)!important;border-color:var(--sg64-border)!important;color:var(--sg64-text)!important;
}
html[data-ava-editor-theme] .sg-looks-desktop-pane .sg-looks-format option{
  background:var(--sg64-surface)!important;color:var(--sg64-text)!important;
}
html[data-ava-editor-theme] .sg-looks-desktop-pane .sg-looks-desktop-apply,
html[data-ava-editor-theme] .sg-looks-mobile-controls .sg-looks-mobile-apply{
  background:var(--sg64-selected)!important;border:1px solid var(--sg64-border)!important;
  color:var(--sg64-text)!important;box-shadow:none!important;
}
html[data-ava-editor-theme] .sg-looks-desktop-pane .sg-looks-desktop-apply:not(:disabled):hover,
html[data-ava-editor-theme] .sg-looks-mobile-controls .sg-looks-mobile-apply:not(:disabled):hover{background:var(--sg64-hover)!important}
html[data-ava-editor-theme] .sg-looks-desktop-pane .sg-looks-desktop-apply:disabled,
html[data-ava-editor-theme] .sg-looks-mobile-controls .sg-looks-mobile-apply:disabled{
  opacity:.58!important;background:var(--sg64-surface)!important;color:var(--sg64-muted)!important;
}
@media(max-width:768px){
 html[data-ava-editor-theme] .sg-looks-mobile-pane .mobile-preset-card{
   background:var(--sg64-surface)!important;border-color:var(--sg64-border)!important;
 }
 html[data-ava-editor-theme] .sg-looks-mobile-pane .mobile-preset-card.active{
   border-color:var(--sg64-focus)!important;box-shadow:0 0 0 1px var(--sg64-focus)!important;
 }
 html[data-ava-editor-theme] .sg-looks-mobile-controls :is(.mtool-top-btn--back,.sg-looks-mobile-preview-action,.sg-looks-mobile-format-action,.sg-looks-mobile-collapse){
   background:var(--sg64-surface)!important;color:var(--sg64-text)!important;border-color:var(--sg64-border)!important;
 }
 html[data-ava-editor-theme] body.sg-looks-active > .sg-looks-mobile-selection:not([hidden]){
   background:var(--sg64-raised)!important;color:var(--sg64-text)!important;border-color:var(--sg64-border)!important;
 }
}
/* Theme-dependent Info menu: original menu is always dark (#11151a). */
html[data-ava-editor-theme] #fotor-root .esg-nav__dropdown--info{
  background:var(--ava-panel,#141416)!important;border:1px solid var(--ava-stroke,#353238)!important;
  color:var(--ava-text,#f8f2f1)!important;box-shadow:0 16px 38px rgba(0,0,0,.18)!important;
}
html[data-ava-editor-theme] #fotor-root .esg-nav__dropdown--info .esg-nav__group{
  background:transparent!important;border-color:transparent!important;
}
html[data-ava-editor-theme] #fotor-root .esg-nav__dropdown--info .esg-nav__group-title{color:var(--ava-muted,#aaa2a4)!important}
html[data-ava-editor-theme] #fotor-root .esg-nav__dropdown--info :is(a,button:not(.esg-nav__link)){
  color:var(--ava-text,#f8f2f1)!important;background:transparent!important;
}
html[data-ava-editor-theme] #fotor-root .esg-nav__dropdown--info :is(a,button:not(.esg-nav__link)):hover,
html[data-ava-editor-theme] #fotor-root .esg-nav__dropdown--info :is(a,button:not(.esg-nav__link)):focus-visible{
  color:var(--ava-text,#f8f2f1)!important;background:var(--ava-active,#292226)!important;
}
/* Avoid duplicate menu styles elsewhere. The same dropdown is rendered by
   the header with or without the extra .esg-nav__dropdown class. */

/* The rest of the editor's desktop image presets are structurally the same
   as the Looks tile: image plus .ai-hair-title. Put the title on the PHOTO
   instead of creating a second row beneath it. No JS/preset-data changes. */
@media(min-width:769px){
 html[data-ava-editor-theme] #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile.sg-desktop-preset-choice:has(> .ai-hair-thumb img){
   position:relative!important;display:block!important;height:auto!important;min-height:0!important;
   grid-template-rows:none!important;overflow:hidden!important;
 }
 html[data-ava-editor-theme] #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile.sg-desktop-preset-choice > .ai-hair-thumb{
   width:100%!important;margin:0!important;flex:none!important;
 }
 html[data-ava-editor-theme] #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile.sg-desktop-preset-choice:has(> .ai-hair-thumb img) > .ai-hair-title{
   position:absolute!important;z-index:6!important;inset:auto 6px 7px!important;
   display:flex!important;align-items:center!important;justify-content:center!important;
   box-sizing:border-box!important;width:auto!important;min-width:0!important;max-width:none!important;
   height:auto!important;min-height:0!important;max-height:48px!important;
   margin:0!important;padding:5px 7px!important;flex:none!important;
   border:1px solid rgba(255,255,255,.22)!important;border-radius:999px!important;
   background:linear-gradient(180deg,rgba(57,58,64,.94),rgba(13,14,18,.95))!important;
   color:#fff!important;box-shadow:0 3px 8px rgba(0,0,0,.48)!important;
   font-family:system-ui,-apple-system,'Segoe UI',sans-serif!important;
   font-size:10px!important;font-weight:800!important;line-height:1.12!important;
   text-align:center!important;text-shadow:0 1px 3px rgba(0,0,0,.85)!important;
   white-space:normal!important;overflow:hidden!important;overflow-wrap:anywhere!important;
   pointer-events:none!important;
 }
 html[data-ava-editor-theme] #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile.sg-desktop-preset-choice:has(> .ai-hair-thumb img) > .ai-hair-title *{
   color:#fff!important;text-shadow:inherit!important;
 }
}
/* Native mobile previews: make image captions visible again, with the same
   small dark pill as desktop/Looks. Keep text-only correction pills intact. */
@media(max-width:768px){
 html[data-ava-editor-theme] #fotor-root .editor-shell.is-mobile .mobile-preset-card:has(.mobile-preset-thumb img) .mobile-preset-name{
   position:absolute!important;z-index:8!important;inset:auto 3px 4px!important;
   display:-webkit-box!important;box-sizing:border-box!important;width:auto!important;
   min-width:0!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:32px!important;
   margin:0!important;padding:3px 4px!important;
   border:1px solid rgba(255,255,255,.19)!important;border-radius:8px!important;
   background:linear-gradient(180deg,rgba(57,58,64,.94),rgba(13,14,18,.95))!important;
   color:#fff!important;box-shadow:0 3px 8px rgba(0,0,0,.4)!important;
   font:800 9px/1.15 system-ui,-apple-system,'Segoe UI',sans-serif!important;
   -webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;
   line-clamp:2!important;white-space:normal!important;overflow:hidden!important;
   text-align:center!important;text-shadow:0 1px 2px rgba(0,0,0,.7)!important;
   pointer-events:none!important;
 }
}

/* Tool navigation button for Looks is neutral too (other tools unchanged). */
html[data-ava-editor-theme] #fotor-root .editor-shell .left-rail .rail-btn[data-section="ai-looks"].active{
  background:#2b2c30!important;color:#f5f4f6!important;border-color:#696970!important;
  box-shadow:inset 2px 0 0 #bec1c8!important;
}
html[data-ava-editor-theme="light"] #fotor-root .editor-shell .left-rail .rail-btn[data-section="ai-looks"].active{
  background:#ece8e6!important;color:#292224!important;border-color:#bab0b2!important;
  box-shadow:inset 2px 0 0 #67646b!important;
}
html[data-ava-editor-theme] #fotor-root .editor-shell .left-rail .rail-btn[data-section="ai-looks"].active :is(.rail-ico,.rail-label){color:inherit!important}
html[data-ava-editor-theme] :is(.sg-looks-desktop-pane,.sg-looks-mobile-pane,.sg-looks-mobile-controls)
  :is(.sg-looks-mode-tab,.sg-looks-desktop-apply,.sg-looks-mobile-apply,.lp-back,.lp-close,.sg-looks-custom-upload):focus-visible{
  outline:2px solid var(--sg64-focus)!important;outline-offset:2px!important;
}
