/* 1.0.332 — one clear mobile Create Photo sheet, CSS only. */
@media (max-width: 768px) {
  #fotor-root .agent-popup.text-image-popup {
    width: calc(100vw - 16px) !important;
    max-width: 430px !important;
    max-height: calc(100dvh - 70px) !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border-radius: 20px !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255,255,255,.18) transparent !important;
  }

  #fotor-root .text-image-popup .text-image-page {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    padding: 0 14px 14px !important;
    box-sizing: border-box !important;
  }

  /* Keep the mobile title, but remove its card-inside-card surface. */
  #fotor-root .text-image-popup .ti-head {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 32px !important;
    align-items: center !important;
    gap: 9px !important;
    margin: 0 !important;
    padding: 14px 0 12px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.065) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #fotor-root .text-image-popup .ti-head h3 {
    font-size: 18px !important;
    line-height: 1.15 !important;
  }

  #fotor-root .text-image-popup .ti-head p {
    font-size: 10px !important;
    line-height: 1.35 !important;
  }

  #fotor-root .text-image-popup .ti-mode-tabs {
    margin: 12px 0 0 !important;
    padding: 3px !important;
    border-radius: 10px !important;
  }

  #fotor-root .text-image-popup .ti-mode-tab {
    min-height: 38px !important;
  }

  /* Explanations use a quiet accent line instead of another container. */
  #fotor-root .text-image-popup .ti-mode-note {
    margin: 12px 0 0 !important;
    padding: 1px 0 1px 10px !important;
    border: 0 !important;
    border-left: 2px solid rgba(67,142,241,.54) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #fotor-root .text-image-popup .ti-field--prompt,
  #fotor-root .text-image-popup .ti-hot-view {
    margin-top: 12px !important;
  }

  #fotor-root .text-image-popup .ti-field textarea {
    min-height: 132px !important;
    font-size: 12px !important;
  }

  #fotor-root .text-image-popup .ti-actions-row,
  #fotor-root .text-image-popup .ti-grid {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(255,255,255,.065) !important;
  }

  #fotor-root .text-image-popup .ti-secondary {
    min-height: 40px !important;
  }

  /* The primary action remains reachable after scrolling a long HOT preset list. */
  #fotor-root .text-image-popup .ti-generate,
  #fotor-root .text-image-popup .ti-generate--hot,
  #fotor-root .text-image-popup .ti-generate--popup-top {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 8 !important;
    min-height: 44px !important;
    margin-top: 12px !important;
    box-shadow: 0 -8px 18px rgba(8,11,15,.72) !important;
  }

  #fotor-root .text-image-popup .ti-presets-shell {
    margin-top: 10px !important;
    border-radius: 11px !important;
  }
}

@media (max-width: 380px) {
  #fotor-root .agent-popup.text-image-popup {
    width: calc(100vw - 10px) !important;
  }

  #fotor-root .text-image-popup .text-image-page {
    padding-inline: 11px !important;
  }
}
