/* Fotor Photo Editor 1.0.170 — Create Photo / HOT mobile editorial UI. */

:root {
  --sgc-bg: #0a0b0d;
  --sgc-panel: #101216;
  --sgc-panel-2: #15171b;
  --sgc-line: rgba(255,255,255,.105);
  --sgc-line-2: rgba(255,255,255,.16);
  --sgc-text: #f5f7fa;
  --sgc-muted: #9298a3;
  --sgc-blue: #2f7df6;
  --sgc-blue-soft: rgba(47,125,246,.13);
  --sgc-hot: #d75770;
  --sgc-hot-soft: rgba(215,87,112,.11);
}

@media (max-width: 768px) {
  body.sg-create-subdialog-open > .sg-mobile-preset-active-label {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* ===== Nested Create Photo dialogs must always sit above the Create Photo popup. ===== */
  body > .ti-mobile-prompt-backdrop,
  .ti-mobile-prompt-backdrop {
    position: fixed !important;
    z-index: 2147483600 !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    border: 0 !important;
    background: rgba(3,4,7,.82) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  body > .ti-mobile-prompt-sheet,
  .ti-mobile-prompt-sheet,
  .ti-mobile-prompt-sheet--hot {
    position: fixed !important;
    z-index: 2147483601 !important;
    top: auto !important;
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
    left: 10px !important;
    width: auto !important;
    max-width: 430px !important;
    max-height: calc(100dvh - 86px) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: block !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid var(--sgc-line-2) !important;
    border-radius: 18px !important;
    background: var(--sgc-bg) !important;
    background-image: none !important;
    color: var(--sgc-text) !important;
    box-shadow: 0 30px 90px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.04) !important;
    overscroll-behavior: contain !important;
  }

  .ti-mobile-prompt-sheet__head {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 34px !important;
    gap: 10px !important;
    align-items: start !important;
    padding: 14px 14px 12px !important;
    border-bottom: 1px solid var(--sgc-line) !important;
    background: #0d0f12 !important;
  }

  .ti-mobile-prompt-sheet__heading {
    display: grid !important;
    gap: 4px !important;
    min-width: 0 !important;
  }

  .ti-mobile-prompt-sheet__head strong {
    color: var(--sgc-text) !important;
    font-size: 15px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    letter-spacing: -.015em !important;
  }

  .ti-mobile-prompt-sheet__head small {
    color: var(--sgc-muted) !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
  }

  .ti-prompt-popup-kicker {
    width: fit-content !important;
    min-height: 20px !important;
    padding: 0 7px !important;
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid rgba(215,87,112,.32) !important;
    border-radius: 999px !important;
    background: var(--sgc-hot-soft) !important;
    color: #ed9cac !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    letter-spacing: .06em !important;
  }

  .ti-mobile-prompt-sheet__head button,
  .ti-style-sheet__head > button {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 10px !important;
    background: #17191d !important;
    color: #d7dbe2 !important;
    box-shadow: none !important;
    font-size: 18px !important;
    line-height: 1 !important;
  }

  .ti-mobile-prompt-sheet > textarea,
  .ti-mobile-prompt-sheet--hot > textarea {
    width: calc(100% - 28px) !important;
    min-height: 128px !important;
    max-height: 220px !important;
    margin: 13px 14px 0 !important;
    padding: 12px 13px !important;
    resize: vertical !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 12px !important;
    outline: 0 !important;
    background: #06080b !important;
    color: #f1f3f7 !important;
    -webkit-text-fill-color: #f1f3f7 !important;
    caret-color: var(--sgc-blue) !important;
    box-shadow: inset 0 1px 8px rgba(0,0,0,.28) !important;
    font: inherit !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
  }

  .ti-mobile-prompt-sheet > textarea:focus {
    border-color: rgba(47,125,246,.72) !important;
    box-shadow: 0 0 0 3px rgba(47,125,246,.12), inset 0 1px 8px rgba(0,0,0,.25) !important;
  }

  .ti-prompt-guide {
    margin: 11px 14px 0 !important;
    padding: 10px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    border: 1px solid rgba(255,255,255,.075) !important;
    border-radius: 12px !important;
    background: #0f1115 !important;
  }

  .ti-prompt-guide__title {
    padding: 0 0 8px !important;
    border-bottom: 1px solid rgba(255,255,255,.075) !important;
  }

  .ti-prompt-guide__title strong {
    color: #e8ebef !important;
    font-size: 10.5px !important;
  }

  .ti-prompt-guide__title span {
    color: #9097a2 !important;
    font-size: 8.5px !important;
  }

  .ti-prompt-guide__item {
    min-height: 0 !important;
    padding: 7px 8px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: rgba(255,255,255,.025) !important;
  }

  .ti-prompt-guide__item > b {
    border: 0 !important;
    background: #1a1d22 !important;
    color: #aeb4be !important;
    box-shadow: none !important;
  }

  .ti-prompt-guide__item code {
    color: #9fb9df !important;
  }

  .ti-mobile-prompt-sheet__footer,
  .ti-mobile-prompt-sheet__footer--hot {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
    gap: 8px !important;
    margin: 12px 14px 14px !important;
    padding: 0 !important;
  }

  .ti-mobile-prompt-sheet__footer--hot > select {
    grid-column: 1 / -1 !important;
  }

  .ti-mobile-prompt-sheet__footer select,
  .ti-mobile-prompt-sheet__footer button {
    min-width: 0 !important;
    height: 42px !important;
    padding: 0 10px !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 10px !important;
    background: #15171b !important;
    color: #edf0f5 !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  .ti-mobile-prompt-sheet__footer > button:last-child {
    border-color: rgba(47,125,246,.42) !important;
    background: var(--sgc-blue) !important;
    color: #fff !important;
  }

  .ti-popup-style-button {
    background: #15171b !important;
    color: #e9edf2 !important;
  }

  /* ===== Style picker above Create Photo as well. ===== */
  body > .ti-style-backdrop,
  .ti-style-backdrop {
    position: fixed !important;
    z-index: 2147483610 !important;
    inset: 0 !important;
    border: 0 !important;
    background: rgba(3,4,7,.82) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  body > .ti-style-sheet,
  .ti-style-sheet {
    position: fixed !important;
    z-index: 2147483611 !important;
    top: auto !important;
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
    left: 10px !important;
    width: auto !important;
    max-width: 430px !important;
    max-height: calc(100dvh - 86px) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid var(--sgc-line-2) !important;
    border-radius: 18px !important;
    background: var(--sgc-bg) !important;
    background-image: none !important;
    box-shadow: 0 30px 90px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.04) !important;
  }

  .ti-style-sheet__head {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 34px !important;
    gap: 10px !important;
    align-items: start !important;
    padding: 14px !important;
    border-bottom: 1px solid var(--sgc-line) !important;
    background: #0d0f12 !important;
  }

  .ti-style-sheet__head strong {
    color: var(--sgc-text) !important;
    font-size: 15px !important;
    font-weight: 850 !important;
  }

  .ti-style-sheet__head small {
    margin-top: 3px !important;
    color: var(--sgc-muted) !important;
    font-size: 9.5px !important;
    line-height: 1.35 !important;
  }

  .ti-style-grid {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 7px !important;
    padding: 12px 12px 7px !important;
  }

  .ti-style-grid > button {
    min-height: 46px !important;
    padding: 8px 9px !important;
    display: grid !important;
    gap: 2px !important;
    align-content: center !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 11px !important;
    background: var(--sgc-panel-2) !important;
    color: #dfe3e9 !important;
    box-shadow: none !important;
    text-align: left !important;
  }

  .ti-style-grid > button.active {
    border-color: rgba(47,125,246,.72) !important;
    background: var(--sgc-blue-soft) !important;
    color: #fff !important;
  }

  .ti-style-grid > button > span:first-child,
  .ti-style-later-hint > span:first-child {
    display: none !important;
  }

  .ti-style-grid > button strong {
    font-size: 10px !important;
    font-weight: 820 !important;
  }

  .ti-style-grid > button code {
    color: #828a96 !important;
    font-size: 8px !important;
  }

  .ti-style-later-hint {
    margin: 5px 12px 12px !important;
    padding: 9px 10px !important;
    border: 1px solid rgba(255,255,255,.07) !important;
    border-radius: 10px !important;
    background: #0f1115 !important;
    color: #8d949e !important;
  }

  /* ===== Create Photo popup shell ===== */
  .agent-popup-overlay.text-image-popup-overlay {
    z-index: 2147483300 !important;
    background: rgba(3,4,7,.72) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
  }

  .agent-popup.text-image-popup {
    width: calc(100vw - 18px) !important;
    max-width: 430px !important;
    max-height: calc(100dvh - 76px) !important;
    padding: 10px !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 18px !important;
    background: var(--sgc-bg) !important;
    background-image: none !important;
    color: var(--sgc-text) !important;
    box-shadow: 0 28px 80px rgba(0,0,0,.66), inset 0 1px 0 rgba(255,255,255,.035) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .text-image-popup .text-image-page {
    display: flex !important;
    flex-direction: column !important;
    gap: 9px !important;
    min-height: 0 !important;
    color: var(--sgc-text) !important;
  }

  .text-image-popup .ti-head {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 32px !important;
    gap: 9px !important;
    padding: 11px !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 11px !important;
    background: var(--sgc-panel) !important;
    background-image: none !important;
    box-shadow: none !important;
  }

  .text-image-popup .ti-head h3 {
    margin: 0 0 3px !important;
    color: var(--sgc-text) !important;
    font-size: 14px !important;
    font-weight: 840 !important;
    line-height: 1.2 !important;
  }

  .text-image-popup .ti-head p {
    margin: 0 !important;
    color: var(--sgc-muted) !important;
    font-size: 9.5px !important;
    line-height: 1.35 !important;
  }

  .text-image-popup .ti-help-btn {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 9px !important;
    background: #191b20 !important;
    color: #d4d9df !important;
    box-shadow: none !important;
  }

  .text-image-popup .ti-mode-tabs {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 4px !important;
    padding: 4px !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 11px !important;
    background: #080a0c !important;
  }

  .text-image-popup .ti-mode-tab {
    min-height: 34px !important;
    padding: 0 8px !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #a3a9b2 !important;
    box-shadow: none !important;
    font-size: 10px !important;
    font-weight: 820 !important;
  }

  .text-image-popup .ti-mode-tab.is-active {
    border-color: rgba(47,125,246,.42) !important;
    background: var(--sgc-blue-soft) !important;
    color: #e7f0ff !important;
  }

  .text-image-popup .ti-mode-tab--hot.is-active {
    border-color: rgba(215,87,112,.38) !important;
    background: var(--sgc-hot-soft) !important;
    color: #f0a7b5 !important;
  }

  .text-image-popup .ti-mode-tab__flame,
  .text-image-popup img.emoji,
  .ti-mobile-prompt-sheet img.emoji,
  .ti-style-sheet img.emoji {
    display: none !important;
  }

  .text-image-popup .ti-generate,
  .text-image-popup .ti-generate--hot,
  .text-image-popup .ti-generate--popup-top {
    width: 100% !important;
    min-height: 42px !important;
    margin: 0 !important;
    border: 1px solid rgba(47,125,246,.38) !important;
    border-radius: 10px !important;
    background: var(--sgc-blue) !important;
    background-image: none !important;
    color: #fff !important;
    box-shadow: none !important;
    font-size: 10.5px !important;
    font-weight: 850 !important;
  }

  .text-image-popup .ti-generate:disabled {
    border-color: rgba(255,255,255,.07) !important;
    background: #202329 !important;
    color: #6f7680 !important;
    opacity: 1 !important;
  }

  /* Standard mode. */
  .text-image-popup .ti-mode-note {
    padding: 9px 10px !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 10px !important;
    background: var(--sgc-panel) !important;
    background-image: none !important;
    box-shadow: none !important;
  }

  .text-image-popup .ti-mode-note strong {
    color: #e7eaee !important;
    font-size: 10.5px !important;
  }

  .text-image-popup .ti-mode-note span {
    color: #8f96a1 !important;
    font-size: 9px !important;
  }

  .text-image-popup .ti-field {
    display: grid !important;
    gap: 6px !important;
    color: #9ea5ae !important;
    font-size: 9px !important;
    font-weight: 800 !important;
  }

  .text-image-popup .ti-field textarea {
    min-height: 120px !important;
    padding: 11px 12px !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 11px !important;
    background: #06080b !important;
    color: #eef1f5 !important;
    -webkit-text-fill-color: #eef1f5 !important;
    box-shadow: inset 0 1px 7px rgba(0,0,0,.26) !important;
    font-size: 10.5px !important;
    line-height: 1.5 !important;
  }

  .text-image-popup .ti-actions-row {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 7px !important;
  }

  .text-image-popup .ti-secondary {
    min-height: 38px !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 10px !important;
    background: var(--sgc-panel-2) !important;
    background-image: none !important;
    color: #d9dde3 !important;
    box-shadow: none !important;
    font-size: 9.5px !important;
    font-weight: 800 !important;
  }

  .text-image-popup .ti-secondary--enhance {
    border-color: rgba(47,125,246,.30) !important;
    background: rgba(47,125,246,.09) !important;
    color: #b7d2fa !important;
  }

  .text-image-popup .ti-help {
    border: 1px solid rgba(255,255,255,.075) !important;
    border-radius: 10px !important;
    background: #0f1115 !important;
  }

  .text-image-popup .ti-grid select,
  .text-image-popup .ti-field select {
    height: 38px !important;
    padding: 0 9px !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 9px !important;
    background: #14161a !important;
    color: #edf0f4 !important;
    box-shadow: none !important;
    color-scheme: dark !important;
    font-size: 9.5px !important;
  }

  /* HOT mode. */
  .text-image-popup .ti-hot-view {
    display: grid !important;
    gap: 9px !important;
  }

  .text-image-popup .ti-hot-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }

  .text-image-popup .ti-custom-prompt-button {
    min-height: 52px !important;
    padding: 9px 10px !important;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 26px !important;
    align-items: center !important;
    gap: 8px !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 11px !important;
    background: var(--sgc-panel) !important;
    background-image: none !important;
    color: #e9edf2 !important;
    box-shadow: none !important;
    text-align: left !important;
  }

  .text-image-popup .ti-custom-prompt-button.is-active {
    border-color: rgba(47,125,246,.54) !important;
    background: var(--sgc-blue-soft) !important;
  }

  .text-image-popup .ti-custom-prompt-button__icon {
    display: none !important;
  }

  .text-image-popup .ti-custom-prompt-button__text {
    display: grid !important;
    gap: 3px !important;
    min-width: 0 !important;
  }

  .text-image-popup .ti-custom-prompt-button__text strong {
    color: #f0f2f5 !important;
    font-size: 10.5px !important;
    font-weight: 840 !important;
  }

  .text-image-popup .ti-custom-prompt-button__text small {
    overflow: hidden !important;
    color: #858c97 !important;
    font-size: 8.7px !important;
    line-height: 1.3 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .text-image-popup .ti-custom-prompt-button__arrow {
    width: 26px !important;
    height: 26px !important;
    display: grid !important;
    place-items: center !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 8px !important;
    background: #191b20 !important;
    color: #9299a4 !important;
    font-size: 16px !important;
  }

  .text-image-popup .ti-hot-toolbar__settings {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
    gap: 7px !important;
  }

  .text-image-popup .ti-style-button,
  .text-image-popup .ti-hot-aspect--toolbar {
    min-height: 48px !important;
    padding: 7px 9px !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 10px !important;
    background: var(--sgc-panel-2) !important;
    background-image: none !important;
    color: #e4e7eb !important;
    box-shadow: none !important;
  }

  .text-image-popup .ti-style-button > span:first-child {
    display: none !important;
  }

  .text-image-popup .ti-style-button > span:last-child {
    display: grid !important;
    gap: 2px !important;
    min-width: 0 !important;
  }

  .text-image-popup .ti-style-button small,
  .text-image-popup .ti-hot-aspect--toolbar .ti-field > span {
    color: #7f8792 !important;
    font-size: 8px !important;
  }

  .text-image-popup .ti-style-button strong {
    overflow: hidden !important;
    color: #dfe3e8 !important;
    font-size: 9.5px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .text-image-popup .ti-style-button > i {
    color: #737b86 !important;
  }

  .text-image-popup .ti-hot-aspect--toolbar {
    display: flex !important;
    align-items: center !important;
  }

  .text-image-popup .ti-hot-aspect--toolbar .ti-field {
    width: 100% !important;
  }

  .text-image-popup .ti-hot-aspect--toolbar select {
    height: 29px !important;
    margin-top: 3px !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 8px !important;
    background: #0b0d10 !important;
    color: #e9edf2 !important;
    color-scheme: dark !important;
  }

  .text-image-popup .ti-presets-shell {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    border: 1px solid var(--sgc-line) !important;
    border-radius: 11px !important;
    background: #0d0f12 !important;
    background-image: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .text-image-popup .ti-presets-intro {
    padding: 9px 10px !important;
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
    background: #101216 !important;
  }

  .text-image-popup .ti-presets-intro strong {
    color: #e8ebef !important;
    font-size: 10px !important;
  }

  .text-image-popup .ti-presets-counter {
    min-width: 28px !important;
    height: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 999px !important;
    background: #181a1f !important;
    color: #abb1ba !important;
    font-size: 8px !important;
  }

  .text-image-popup .ti-presets-scroll {
    padding: 8px !important;
    background: #0b0d10 !important;
  }

  .text-image-popup .ti-presets-grid {
    gap: 7px !important;
  }

  .text-image-popup .ti-preset-card {
    border: 1px solid rgba(255,255,255,.09) !important;
    border-radius: 11px !important;
    background: #14161a !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .text-image-popup .ti-preset-card.active {
    border-color: rgba(47,125,246,.72) !important;
    box-shadow: 0 0 0 1px rgba(47,125,246,.12) !important;
  }

  .text-image-popup .ti-preset-card__number {
    top: 6px !important;
    left: 6px !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 5px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 7px !important;
    background: rgba(9,10,13,.78) !important;
    color: #c5cad1 !important;
    box-shadow: none !important;
    font-size: 8px !important;
  }

  .text-image-popup .ti-preset-card__content {
    padding: 24px 8px 8px !important;
    background: linear-gradient(180deg, transparent 0%, rgba(5,6,8,.90) 70%) !important;
  }

  .text-image-popup .ti-preset-card__content strong {
    font-size: 9.5px !important;
    line-height: 1.15 !important;
  }

  .text-image-popup .ti-preset-card__content small {
    color: #a1a7b0 !important;
    font-size: 7.8px !important;
    line-height: 1.25 !important;
  }

  /* Do not let WordPress emoji images distort Create Photo controls. */
  .text-image-popup img.wp-smiley,
  .text-image-popup img.emoji,
  .ti-mobile-prompt-sheet img.wp-smiley,
  .ti-mobile-prompt-sheet img.emoji,
  .ti-style-sheet img.wp-smiley,
  .ti-style-sheet img.emoji {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
  }
}

@media (max-width: 380px) {
  .agent-popup.text-image-popup {
    width: calc(100vw - 12px) !important;
    padding: 7px !important;
  }

  .text-image-popup .ti-head {
    padding: 9px !important;
  }

  .text-image-popup .ti-hot-toolbar__settings,
  .ti-mobile-prompt-sheet__footer,
  .ti-mobile-prompt-sheet__footer--hot {
    grid-template-columns: 1fr !important;
  }

  .ti-mobile-prompt-sheet__footer--hot > select {
    grid-column: auto !important;
  }
}
