/* Fotor Photo Editor 1.0.285 — stage 4.2: shared desktop preset cards. */

@media (min-width: 769px) {
  /* The main AI preset collections keep a predictable two-column rhythm. */
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-grid,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-styles-grid,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ti-presets-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  /* Image-led AI presets: shorter than the legacy 280px tiles, with a stable
     caption area. Full silhouettes remain readable without dominating a panel. */
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile.sg-desktop-preset-choice {
    position: relative !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) 46px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 236px !important;
    min-height: 236px !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, .09) !important;
    border-radius: 12px !important;
    background: #10151b !important;
    color: #edf2f8 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile.sg-desktop-preset-choice:hover:not(:disabled) {
    border-color: rgba(109, 169, 244, .44) !important;
    background: #121a24 !important;
    transform: none !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile.sg-desktop-preset-choice .ai-hair-thumb {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #0b0f14 !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile.sg-desktop-preset-choice .ai-hair-thumb img,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile.sg-desktop-preset-choice .ai-hair-thumb video {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile.sg-desktop-preset-choice .ai-hair-title {
    display: -webkit-box !important;
    align-content: center !important;
    min-width: 0 !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 !important;
    padding: 9px 10px !important;
    overflow: hidden !important;
    border-top: 1px solid rgba(255, 255, 255, .065) !important;
    border-radius: 0 !important;
    background: #11161d !important;
    color: rgba(237, 242, 248, .94) !important;
    font-size: 12px !important;
    font-weight: 740 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
  }

  /* Prompt/reference tiles are choices too, but keep their own content layout. */
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-grid > .sg-action-card.sg-desktop-preset-choice {
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 112px !important;
    border: 1px solid rgba(255, 255, 255, .09) !important;
    border-radius: 12px !important;
    background: #10151b !important;
    box-shadow: none !important;
  }

  /* Special preset components retain their tested sizes. */
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ti-preset-card.sg-desktop-preset-choice,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .product-creative-quick > .sg-desktop-preset-choice,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-styles-tile.sg-desktop-preset-choice {
    position: relative !important;
    min-width: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, .09) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    transform: none !important;
  }

  /* Selected means blue frame + check. Premium remains a separate badge. */
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .sg-desktop-preset-choice.active,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .sg-desktop-preset-choice.selected,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .sg-desktop-preset-choice[aria-pressed="true"],
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .sg-desktop-preset-choice[aria-selected="true"] {
    border-color: rgba(86, 158, 248, .88) !important;
    box-shadow: inset 0 0 0 1px rgba(86, 158, 248, .2) !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .left-panel .sg-desktop-preset-choice.active::before,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .sg-desktop-preset-choice.selected::before,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .sg-desktop-preset-choice[aria-pressed="true"]::before,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .sg-desktop-preset-choice[aria-selected="true"]::before {
    content: "✓" !important;
    position: absolute !important;
    top: 7px !important;
    right: 7px !important;
    z-index: 8 !important;
    display: grid !important;
    place-items: center !important;
    width: 22px !important;
    height: 22px !important;
    border: 1px solid rgba(255, 255, 255, .62) !important;
    border-radius: 999px !important;
    background: #2f7df6 !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .38) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    pointer-events: none !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .left-panel .pro-badge,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-styles-badge,
  #fotor-root .editor-shell:not(.is-mobile) .left-panel [data-sg-premium-badge] {
    border: 1px solid rgba(198, 166, 255, .25) !important;
    background: rgba(91, 57, 145, .9) !important;
    color: #f0e8ff !important;
    box-shadow: none !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .left-panel .sg-desktop-preset-choice:focus-visible {
    outline: 2px solid rgba(105, 174, 255, .9) !important;
    outline-offset: 2px !important;
  }
}

@media (min-width: 769px) and (max-height: 760px) {
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-tile.sg-desktop-preset-choice {
    height: 210px !important;
    min-height: 210px !important;
  }
}
