/*
 * PromXAI Theme 1.4.15.57 — modern favorites visual system.
 * Scope: favorites page only. Desktop/laptop adopts the fixed rail, natural
 * artwork masonry and floating navigation dock. Phone/tablet keep their
 * existing navigation and receive only a compact favorites header/filter row.
 */

.px-favorites-desktop-only {
  display: none;
}

.px-favorites-mobile-only {
  display: block;
}

.px-favorites-modern {
  min-height: 100dvh;
}

.px-favorites-modern__content {
  min-width: 0;
}

.px-favorites-modern__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.px-favorites-modern__title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.px-favorites-modern__title-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border: 1px solid var(--px-border);
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--px-accent-gradient);
  box-shadow: 0 10px 24px rgb(124 58 237 / .18), inset 0 1px 0 rgb(255 255 255 / .15);
}

.px-favorites-modern__title-icon .px-icon {
  width: 19px;
  height: 19px;
}

.px-favorites-modern__title > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.px-favorites-modern__title h1 {
  margin: 0;
  color: var(--px-text);
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1;
}

.px-favorites-modern__title p {
  max-width: 520px;
  margin: 0;
  color: var(--px-muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.px-favorites-sort {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--px-border);
  border-radius: 999px;
  display: inline-flex;
  gap: 3px;
  background: var(--px-surface);
  box-shadow: var(--px-glass-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
}

.px-favorites-sort button {
  min-height: 30px;
  padding: 5px 13px;
  border: 0;
  border-radius: 999px;
  color: var(--px-muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.px-favorites-sort button:hover,
.px-favorites-sort button:focus-visible {
  color: var(--px-text);
  background: var(--px-surface-soft);
}

.px-favorites-sort button:active {
  transform: translateY(1px);
}

.px-favorites-sort button.is-active {
  color: #fff;
  background: var(--px-accent-gradient);
  box-shadow: 0 7px 17px rgb(124 58 237 / .18), inset 0 1px 0 rgb(255 255 255 / .16);
}

.px-favorites-no-results {
  min-height: 240px;
  padding: 28px;
  border: 1px dashed var(--px-border-strong);
  border-radius: 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--px-muted);
  text-align: center;
  background: var(--px-surface-soft);
}

.px-favorites-no-results > .px-icon {
  width: 30px;
  height: 30px;
  color: #8b7cf6;
}

.px-favorites-no-results strong {
  color: var(--px-text);
  font-size: 17px;
}

.px-favorites-no-results span {
  font-size: 12px;
}

.px-favorites-modern .px-favorite-card-filtered {
  display: none !important;
}

/* Desktop/laptop visual system. */
@media (min-width: 900px) {
  body.promxai-favorites-modern-page {
    --px-fav-rail-bg: var(--px-ui-rail-bg);
    --px-fav-rail-soft: var(--px-ui-rail-soft);
    --px-fav-rail-hover: var(--px-ui-rail-hover);
    --px-fav-rail-line: var(--px-ui-rail-line);
    --px-fav-rail-line-strong: var(--px-ui-rail-line-strong);
    --px-fav-rail-shadow: var(--px-ui-rail-shadow);
    --px-fav-dock-bg: var(--px-ui-dock-bg);
    --px-fav-rail-width: 206px;
    --px-fav-content-gap: 17px;
    --px-fav-content-edge: 17px;
    --px-fav-rail-padding-x: 12px;
    --px-shell-rail-width: var(--px-fav-rail-width);
    --px-shell-rail-padding-x: var(--px-fav-rail-padding-x);
    --px-shell-rail-bg: var(--px-fav-rail-bg);
    --px-shell-rail-soft: var(--px-fav-rail-soft);
    --px-shell-rail-hover: var(--px-fav-rail-hover);
    --px-shell-rail-line: var(--px-fav-rail-line);
    --px-shell-rail-line-strong: var(--px-fav-rail-line-strong);
    --px-shell-rail-shadow: var(--px-fav-rail-shadow);
    --px-shell-dock-bg: var(--px-fav-dock-bg);
    padding-bottom: 0;
  }

  body.promxai-favorites-modern-page > .px-header,
  body.promxai-favorites-modern-page .px-footer {
    display: none !important;
  }

  body.promxai-favorites-modern-page .px-favorites-desktop-only {
    display: flex;
  }

  body.promxai-favorites-modern-page .px-favorites-mobile-only {
    display: none !important;
  }

  body.promxai-favorites-modern-page .px-favorites-modern {
    width: auto;
    margin: 0 var(--px-fav-content-edge) 0 calc(var(--px-fav-rail-width) + var(--px-fav-content-gap));
    padding: 16px 0 114px;
  }

  body.promxai-favorites-modern-page .px-favorites-modern__head {
    min-height: 58px;
    margin-bottom: 12px;
    padding: 0 2px 11px;
    border-bottom: 1px solid var(--px-fav-rail-line);
  }

  body.promxai-favorites-modern-page .px-favorites-modern__title h1 {
    font-size: clamp(28px, 2.7vw, 38px);
  }

  .px-favorites-sidebar__section {
    min-height: 0;
    flex: 1 1 auto;
    padding-top: 8px;
    border-top: 1px solid var(--px-fav-rail-line);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
  }

  .px-favorites-sidebar__section h2 {
    margin: 0;
    padding-inline: 3px;
    color: var(--px-muted);
    font-size: 9.5px;
    font-weight: 820;
  }

  .px-favorites-sidebar__filters {
    min-height: 0;
    padding: 1px 3px 9px 1px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgb(112 90 255 / .34) transparent;
  }

  .px-favorites-sidebar__filters::-webkit-scrollbar {
    width: 4px;
  }

  .px-favorites-sidebar__filters::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgb(112 90 255 / .34);
  }

  .px-favorites-sidebar__filters button {
    width: 100%;
    min-height: 33px;
    padding: 4px 7px;
    border: 1px solid transparent;
    border-radius: 9px;
    display: grid;
    grid-template-columns: 19px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    color: var(--px-muted);
    background: transparent;
    cursor: pointer;
    font-size: 9px;
    font-weight: 780;
    text-align: start;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
  }

  .px-favorites-sidebar__filters button:hover,
  .px-favorites-sidebar__filters button:focus-visible {
    color: var(--px-text);
    border-color: var(--px-fav-rail-line);
    background: var(--px-fav-rail-hover);
  }

  .px-favorites-sidebar__filters button:active {
    transform: translateY(1px);
  }

  .px-favorites-sidebar__filter-icon {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
  }

  .px-favorites-sidebar__filter-icon .px-icon {
    width: 14px;
    height: 14px;
  }

  .px-favorites-sidebar__filter-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .px-favorites-sidebar__filters button small {
    min-width: 21px;
    height: 18px;
    padding-inline: 5px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: inherit;
    background: rgb(128 143 177 / .09);
    font-size: 7.5px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
  }

  .px-favorites-sidebar__filters button.is-active {
    width: calc(100% + var(--px-fav-rail-padding-x) + 1px);
    margin-left: calc(-1 * (var(--px-fav-rail-padding-x) + 1px));
    padding-left: calc(var(--px-fav-rail-padding-x) + 8px);
    border-radius: 0 10px 10px 0;
    color: #fff;
    border-color: transparent;
    background: var(--px-accent-gradient);
    box-shadow: 0 7px 15px rgb(124 58 237 / .14);
  }

  .px-favorites-sidebar__filters button.is-active small {
    background: rgb(255 255 255 / .16);
  }

  /* Gallery geometry is owned once below by the shared measured masonry. */

}

@media (min-width: 900px) and (max-width: 1240px) {
  body.promxai-favorites-modern-page {
    --px-fav-rail-width: 190px;
    --px-fav-content-gap: 13px;
    --px-fav-content-edge: 13px;
    --px-fav-rail-padding-x: 10px;
  }



  .px-favorites-modern__head {
    gap: 14px;
  }

  .px-favorites-sort button {
    padding-inline: 10px;
  }
}

/* Tablet and phone: compact the new page header without changing card geometry. */
@media (min-width: 761px) and (max-width: 899px) {
  .px-favorites-desktop-only {
    display: none !important;
  }

  .px-favorites-mobile-only {
    display: block;
  }

  .px-favorites-modern {
    padding: 22px 0 112px;
  }

  .px-favorites-modern__content {
    width: min(100% - 24px, 1180px);
    margin-inline: auto;
  }

  .px-favorites-modern__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid var(--px-border);
    border-radius: 22px;
    background: var(--px-surface);
    box-shadow: var(--px-glass-shadow);
  }

  .px-favorites-modern__title h1 {
    font-size: 30px;
  }

  .px-favorites-modern__title p {
    font-size: 12px;
  }

  .px-favorites-modern__metrics {
    width: 100%;
  }

  .px-favorites-sort {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .px-favorites-sort button {
    min-width: 0;
    padding-inline: 6px;
  }

  .px-favorites-mobile-toolbar {
    margin-bottom: 14px;
    padding: 5px;
    border: 1px solid var(--px-border);
    border-radius: 18px;
    display: flex;
    gap: 5px;
    overflow-x: auto;
    background: var(--px-surface);
    box-shadow: var(--px-glass-shadow);
    scrollbar-width: none;
  }

  .px-favorites-mobile-toolbar::-webkit-scrollbar {
    display: none;
  }

  .px-favorites-mobile-toolbar button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 7px 12px;
    border: 0;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--px-muted);
    background: transparent;
    font-size: 11px;
    font-weight: 820;
  }

  .px-favorites-mobile-toolbar button small {
    min-width: 20px;
    height: 20px;
    padding-inline: 5px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--px-surface-soft);
    font-size: 8px;
  }

  .px-favorites-mobile-toolbar button.is-active {
    color: #fff;
    background: var(--px-accent-gradient);
  }

  .px-favorites-mobile-toolbar button.is-active small {
    background: rgb(255 255 255 / .16);
  }
}

/* --------------------------------------------------------------------------
 * 1.4.15.56 — single structural owner for Favorites cards
 *
 * Prompt/video favorites no longer reuse the historical .px-prompt-card shell.
 * This prevents old aspect-ratio, absolute-media and intrinsic-size layers from
 * collapsing cards into horizontal lines or heart-only slivers.
 * -------------------------------------------------------------------------- */

.px-favorites-modern__title {
  flex-wrap: wrap;
  gap: 9px;
}

.px-favorites-modern__title h1 {
  font-size: clamp(27px, 2.5vw, 38px);
}

.px-favorites-modern__saved-count {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--px-border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--px-muted);
  background: var(--px-surface-soft);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.px-favorites-modern__saved-count strong {
  color: var(--px-text);
  font-size: 12px;
  font-weight: 900;
}

.px-favorites-grid > [data-favorite-card][hidden],
.px-favorites-grid > .px-favorite-card-filtered {
  display: none !important;
}

.px-fav-card {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  isolation: isolate;
  content-visibility: visible;
  contain: none;
}

.px-fav-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--px-fav-ratio, 9 / 16);
  overflow: hidden;
  border: 1px solid var(--px-border);
  border-radius: 18px;
  color: inherit;
  background: var(--px-surface-soft);
  box-shadow: 0 14px 34px rgb(4 8 20 / .13);
  line-height: 0;
  isolation: isolate;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.px-fav-card:hover .px-fav-card__media,
.px-fav-card:focus-within .px-fav-card__media {
  border-color: rgb(139 92 246 / .72);
  box-shadow: 0 17px 38px rgb(4 8 20 / .18), 0 0 0 1px rgb(192 38 211 / .18);
}

.px-fav-card__image {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  background: transparent;
  transform: none;
  user-select: none;
  -webkit-user-drag: none;
}

.px-fav-card--library .px-fav-card__image {
  object-fit: contain;
  background: var(--px-surface-soft);
}

.px-fav-card__placeholder {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--px-muted);
  background: linear-gradient(145deg, var(--px-surface-soft), var(--px-surface));
}

.px-fav-card__placeholder .px-icon {
  width: 34px;
  height: 34px;
}

.px-fav-card__favorite {
  position: absolute !important;
  z-index: 12 !important;
  top: 9px !important;
  right: 9px !important;
  left: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  border: 1px solid rgb(255 255 255 / .16) !important;
  border-radius: 13px !important;
  display: grid !important;
  place-items: center !important;
  color: #fff !important;
  background: rgb(12 19 36 / .76) !important;
  box-shadow: 0 8px 20px rgb(0 0 0 / .22), inset 0 1px 0 rgb(255 255 255 / .12) !important;
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
}

html[data-theme="light"] .px-fav-card__favorite {
  color: #6d55e6 !important;
  border-color: rgb(82 97 135 / .16) !important;
  background: rgb(255 255 255 / .88) !important;
  box-shadow: 0 8px 20px rgb(55 68 103 / .13), inset 0 1px 0 rgb(255 255 255 / .9) !important;
}

.px-fav-card__favorite.is-saved {
  color: #fff !important;
  border-color: transparent !important;
  background: var(--px-accent-gradient) !important;
}

.px-fav-card__favorite .px-icon {
  width: 20px !important;
  height: 20px !important;
}

.px-fav-card__play {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  border: 1px solid rgb(255 255 255 / .32);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgb(7 10 18 / .48);
  box-shadow: 0 10px 26px rgb(0 0 0 / .28);
  transform: translate(-50%, -50%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.px-fav-card__play .px-icon {
  width: 25px;
  height: 25px;
}

.px-fav-card__duration {
  position: absolute;
  z-index: 9;
  min-height: 27px;
  padding: 5px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 8px 18px rgb(0 0 0 / .18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.px-fav-card__duration {
  inset-inline-start: auto;
  inset-inline-end: 9px;
  bottom: 9px;
  background: rgb(7 10 18 / .68);
}


.px-fav-card__lock {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--px-accent-gradient);
  box-shadow: 0 12px 26px rgb(20 12 55 / .25);
  transform: translate(-50%, -50%);
}

/* Favorite action/duration corners are physical and language-independent.
 * Library identity badges are owned by library-card-badges.css. */

html[dir="rtl"] .px-fav-card__favorite,
html[dir="ltr"] .px-fav-card__favorite {
  right: 9px !important;
  left: auto !important;
}

html[dir="rtl"] .px-fav-card__duration,
html[dir="ltr"] .px-fav-card__duration {
  right: 9px;
  left: auto;
}

.px-fav-card__title {
  position: absolute;
  z-index: 7;
  inset-inline: 9px;
  bottom: 9px;
  min-height: 42px;
  max-height: 58px;
  padding: 7px 9px;
  border: 1px solid rgb(255 255 255 / .10);
  border-radius: 11px;
  display: flex;
  align-items: center;
  color: #fff;
  background: rgb(7 12 24 / .72);
  box-shadow: 0 8px 18px rgb(0 0 0 / .18);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: bottom .2s ease;
}

.px-fav-card__actions {
  position: absolute;
  z-index: 11;
  inset: auto 9px 9px;
  min-height: 48px;
  padding: 5px;
  border: 1px solid rgb(255 255 255 / .12);
  border-radius: 15px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 5px;
  background: rgb(8 15 29 / .80);
  box-shadow: 0 13px 28px rgb(0 0 0 / .24), inset 0 1px 0 rgb(255 255 255 / .10);
  opacity: 0;
  transform: translateY(9px);
  pointer-events: none;
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
  transition: opacity .2s ease, transform .2s ease;
}

html[data-theme="light"] .px-fav-card__actions {
  border-color: rgb(68 84 121 / .14);
  background: rgb(255 255 255 / .88);
  box-shadow: 0 13px 28px rgb(55 68 103 / .14), inset 0 1px 0 rgb(255 255 255 / .9);
}

.px-fav-card:hover .px-fav-card__actions,
.px-fav-card:focus-within .px-fav-card__actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.px-fav-card--library:hover .px-fav-card__title,
.px-fav-card--library:focus-within .px-fav-card__title {
  bottom: 66px;
}

.px-fav-card__share,
.px-fav-card__view {
  min-height: 38px;
  border: 1px solid rgb(255 255 255 / .10);
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgb(255 255 255 / .06);
  cursor: pointer;
}

html[data-theme="light"] .px-fav-card__share,
html[data-theme="light"] .px-fav-card__view {
  color: var(--px-text);
  border-color: rgb(68 84 121 / .12);
  background: rgb(56 73 112 / .05);
}

.px-fav-card__share {
  width: 38px;
  padding: 0;
}

.px-fav-card__view {
  min-width: 0;
  padding: 0 9px;
  gap: 6px;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.px-fav-card__view > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.px-fav-card__share .px-icon,
.px-fav-card__view .px-icon {
  width: 17px;
  height: 17px;
}

@media (min-width: 761px) {
  body.promxai-favorites-modern-page .px-favorites-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: start !important;
    width: 100% !important;
    min-height: 240px;
    direction: ltr;
  }

  html[data-ui-lang="ar"] body.promxai-favorites-modern-page .px-favorites-grid > .px-fav-card { direction: rtl; }
  html[data-ui-lang="en"] body.promxai-favorites-modern-page .px-favorites-grid > .px-fav-card { direction: ltr; }

  body.promxai-favorites-modern-page .px-favorites-grid.is-promxai-masonry {
    position: relative !important;
    display: block !important;
    height: var(--px-masonry-height, auto);
  }

  body.promxai-favorites-modern-page .px-favorites-grid.is-promxai-masonry > .px-fav-card {
    position: absolute !important;
    top: var(--px-masonry-y, 0px) !important;
    left: var(--px-masonry-x, 0px) !important;
    width: var(--px-masonry-card-width) !important;
    margin: 0 !important;
  }
}

@media (min-width: 900px) {
  body.promxai-favorites-modern-page .px-favorites-modern {
    padding-top: 12px;
  }

  body.promxai-favorites-modern-page .px-favorites-modern__head {
    min-height: 58px;
    margin-bottom: 13px;
    padding: 0 2px 11px;
  }

  body.promxai-favorites-modern-page .px-favorites-sidebar__section {
    margin-top: 12px;
  }

  body.promxai-favorites-modern-page .px-favorites-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 13px !important;
  }
}

@media (min-width: 1600px) {
  body.promxai-favorites-modern-page .px-favorites-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}

@media (max-width: 899px) {
  .px-fav-card__actions {
    display: none;
  }

  .px-fav-card__title {
    bottom: 8px;
  }
}

/* 1.4.15.57 — final owner of favorites filter visibility.
 * This rule intentionally comes after all desktop/mobile card display rules. */
body.promxai-favorites-modern-page .px-favorites-grid > .px-fav-card[hidden],
body.promxai-favorites-modern-page .px-favorites-grid > .px-fav-card.px-favorite-card-filtered {
  display: none !important;
}


/* 1.4.15.102 — quiet phone favorites feed owner. */
@media (max-width: 760px) {
  body.promxai-favorites-modern-page .px-favorites-modern{
    min-height: 100dvh;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 0 calc(108px + env(safe-area-inset-bottom, 0px));
    background: transparent;
  }

  body.admin-bar.promxai-favorites-modern-page .px-favorites-modern{ padding-top: calc(56px + env(safe-area-inset-top, 0px)); }
  body.promxai-favorites-modern-page :is(.px-favorites-sidebar, .px-favorites-desktop-only, .px-favorites-mobile-toolbar, .px-favorites-sort){ display: none !important; }

  body.promxai-favorites-modern-page .px-favorites-modern__content{ width: 100%; margin: 0; padding: 0 8px; }
  /* The active dock item already communicates Favorites on phone. */
  body.promxai-favorites-modern-page .px-favorites-modern__head{
    display: none !important;
  }

  body.promxai-favorites-modern-page .px-favorites-grid,
  body.promxai-favorites-modern-page .px-favorites-grid.is-promxai-masonry{
    position: static !important;
    width: 100%;
    min-height: 160px;
    height: auto !important;
    display: block !important;
    columns: 2;
    column-gap: 8px;
    direction: rtl;
  }

  html[data-ui-lang="en"] body.promxai-favorites-modern-page .px-favorites-grid{ direction: ltr; }

  body.promxai-favorites-modern-page .px-favorites-grid > .px-fav-card,
  body.promxai-favorites-modern-page .px-favorites-grid.is-promxai-masonry > .px-fav-card{
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0;
    min-height: 0 !important;
    margin: 0 0 8px;
    border: 0 !important;
    border-radius: 0;
    display: inline-block;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
    vertical-align: top;
    direction: rtl;
    content-visibility: visible;
    contain: none;
  }

  html[data-ui-lang="en"] body.promxai-favorites-modern-page .px-fav-card{ direction: ltr; }

  body.promxai-favorites-modern-page .px-fav-card__media{
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 17px;
    display: block;
    aspect-ratio: auto !important;
    overflow: hidden;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 0;
  }

  body.promxai-favorites-modern-page .px-fav-card__image{
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: block !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    background: transparent !important;
  }

  body.promxai-favorites-modern-page .px-fav-card__placeholder{
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 150px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    color: var(--px-mobile-app-muted);
    background: var(--px-mobile-app-soft);
    line-height: 1;
  }

  body.promxai-favorites-modern-page .px-fav-card :is(
    .px-fav-card__favorite,
    .px-fav-card__view,
    .px-fav-card__share,
    .px-fav-card__title,
    .px-fav-card__duration,
    .px-fav-card__play,
    .px-fav-card__lock
  ){ display: none !important; }

  body.promxai-favorites-modern-page .px-fav-card__library-details{display:contents!important}
  body.promxai-favorites-modern-page .px-fav-card__meta{display:none!important}

  /* test245 — Favorites on phone is a clean saved-content feed. The card-level
   * heart duplicated state that is already implied by this page and collided
   * with PRO / price / Featured identity badges. Removal remains available in
   * each canonical detail view, so the card itself owns no destructive action. */
  body.promxai-favorites-modern-page .px-fav-card__actions,
  body.promxai-favorites-modern-page .px-fav-card .px-fav-card__favorite-action{
    display:none!important;
  }

  body.promxai-favorites-modern-page :is(.px-favorites-no-results, .px-favorites-empty){ column-span: all; min-height: 200px; margin-top: 12px; border-color: var(--px-mobile-app-line); border-radius: 20px; color: var(--px-mobile-app-muted); background: var(--px-mobile-app-soft); box-shadow: none; break-inside: avoid; }
}

@media (max-width: 360px) {
  body.promxai-favorites-modern-page .px-favorites-grid{ column-gap: 6px; }
  body.promxai-favorites-modern-page .px-favorites-grid > .px-fav-card{ margin-bottom: 6px; }
  body.promxai-favorites-modern-page .px-fav-card__media{ border-radius: 15px; }
}


/* 1.4.15.129 — deterministic guest hydration and phone video parity. */
.px-favorites-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--px-text-secondary, #94a3b8);
  font-weight: 700;
}
.px-favorites-loading[hidden] { display: none !important; }
.px-favorites-loading__spinner {
  width: 30px;
  height: 30px;
  border: 3px solid color-mix(in srgb, var(--px-accent-blue, #4f6df5) 22%, transparent);
  border-top-color: var(--px-accent-blue, #4f6df5);
  border-radius: 50%;
  animation: px-favorites-spin .8s linear infinite;
}
@keyframes px-favorites-spin { to { transform: rotate(360deg); } }
[data-favorites-hydration="pending"] [data-favorites-empty],
[data-favorites-hydration="pending"] [data-favorites-modern-no-results] { display: none !important; }

@media (max-width: 760px) {
  body.promxai-favorites-modern-page .px-fav-card .px-fav-card__play {
    display: grid !important;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    border: 1px solid rgb(255 255 255 / .3);
    background: rgb(7 12 24 / .82);
  }
  body.promxai-favorites-modern-page .px-fav-card .px-fav-card__play .px-icon {
    width: 26px !important;
    height: 26px !important;
    fill: none !important;
    stroke: currentColor !important;
  }
  body.promxai-favorites-modern-page .px-fav-card .px-fav-card__duration {
    display: inline-flex !important;
    left: 50% !important;
    right: auto !important;
    inset-inline-start: auto !important;
    bottom: auto !important;
    top: calc(50% + 31px) !important;
    transform: translateX(-50%) !important;
    min-height: 24px;
    padding: 4px 9px;
    font-size: 11px;
  }
}

/* ========================================================================
   PromXAI Theme 2.0.0-RC34 — Favorite Library Hover Parity
   Library items inside Favorites now use the same image-first interaction as
   the Library archive: title, access/status and actions form one glass panel
   that is revealed on hover/focus for fine-pointer desktop/laptop devices.
   Touch devices keep the panel visible so actions remain discoverable.
   ======================================================================== */
.px-fav-card--library .px-fav-card__library-details {
  position: absolute;
  z-index: 12;
  inset-inline: 9px;
  bottom: 9px;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgb(255 255 255 / .13);
  border-radius: 14px;
  color: #fff;
  background: rgb(7 13 27 / .80);
  box-shadow: 0 14px 34px rgb(0 0 0 / .24), inset 0 1px 0 rgb(255 255 255 / .08);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
  transition: opacity .22s ease, transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.px-fav-card--library .px-fav-card__library-details .px-fav-card__title {
  position: static !important;
  inset: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: block !important;
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.42 !important;
  text-decoration: none;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.px-fav-card--library .px-fav-card__meta {
  min-height: 24px;
  display: flex;
  align-items: center;
}

.px-fav-card--library .px-fav-card__meta > span {
  min-height: 24px;
  padding: 5px 8px;
  border: 1px solid rgb(255 255 255 / .14);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: rgb(255 255 255 / .82);
  background: rgb(255 255 255 / .08);
  font-size: 9.5px;
  font-weight: 820;
  line-height: 1;
}

.px-fav-card--library .px-fav-card__meta > span.is-soon {
  color: #ffe4a3;
  border-color: rgb(245 158 11 / .22);
  background: rgb(245 158 11 / .14);
}

.px-fav-card--library .px-fav-card__library-details .px-fav-card__actions {
  position: static !important;
  inset: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html[data-theme="light"] .px-fav-card--library .px-fav-card__library-details {
  border-color: rgb(255 255 255 / .22);
  background: rgb(20 29 47 / .80);
  box-shadow: 0 14px 34px rgb(35 49 73 / .20), inset 0 1px 0 rgb(255 255 255 / .11);
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .px-fav-card--library .px-fav-card__library-details {
    opacity: 0;
    transform: translateY(9px);
    pointer-events: none;
  }

  .px-fav-card--library:hover .px-fav-card__library-details,
  .px-fav-card--library:focus-within .px-fav-card__library-details {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

/* test221 — unified Favorites cards for AI Tools, AI News and AI Commands.
 * Column width remains owned by the canonical .px-fav-card masonry grid; only
 * content height varies naturally per saved AI item. */
.px-fav-card--ai{
  overflow:hidden;
  border:1px solid var(--px-border);
  border-radius:18px;
  background:linear-gradient(155deg,var(--px-surface),var(--px-surface-soft));
  box-shadow:0 14px 34px rgb(4 8 20 / .13);
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease;
}
.px-fav-card--ai:hover,.px-fav-card--ai:focus-within{
  border-color:rgb(139 92 246 / .64);
  box-shadow:0 17px 38px rgb(4 8 20 / .18),0 0 0 1px rgb(192 38 211 / .12);
  transform:translateY(-1px);
}
.px-fav-card--ai .px-fav-card__media{border:0;border-radius:0;box-shadow:none}
.px-fav-ai__news-media{aspect-ratio:var(--px-fav-ratio,16 / 9)}
.px-fav-ai__stage{
  position:relative;
  min-height:124px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  overflow:hidden;
  color:inherit;
  text-decoration:none;
  background:
    radial-gradient(circle at 78% 18%,rgb(57 189 255 / .16),transparent 32%),
    radial-gradient(circle at 20% 82%,rgb(183 73 255 / .13),transparent 34%),
    linear-gradient(145deg,rgb(15 34 62 / .92),rgb(12 24 44 / .96));
}
html[data-theme="light"] .px-fav-ai__stage{background:linear-gradient(145deg,#f8fbff,#eef4ff)}
.px-fav-ai__identity{display:grid;place-items:center;gap:9px;position:relative;z-index:2}
.px-fav-ai__logo{
  width:58px;height:58px;display:grid;place-items:center;
  border:1px solid rgb(139 163 205 / .18);border-radius:16px;
  background:#fff;box-shadow:0 10px 26px rgb(0 0 0 / .16);overflow:hidden;color:#638cff;
}
.px-fav-ai__logo>.px-icon{width:27px;height:27px}
.px-fav-ai__logo :is(.px-compat-logo,.px-ai-tool-brand-fallback,.px-fav-ai__brandmark){width:100%;height:100%;display:grid;place-items:center;background:transparent;border:0;box-shadow:none}
.px-fav-ai__logo img{width:38px;height:38px;max-width:38px;max-height:38px;object-fit:contain}
.px-fav-ai__type{color:var(--px-text);font-size:10px;font-weight:900}
.px-fav-ai__type-badge{
  position:absolute;z-index:4;inset-inline-start:9px;bottom:9px;min-height:28px;
  display:inline-flex;align-items:center;gap:5px;padding:0 9px;border-radius:999px;
  color:#fff;background:rgb(8 15 29 / .76);font-size:9px;font-weight:900;
  backdrop-filter:blur(10px)
}
.px-fav-ai__type-badge .px-icon{width:13px;height:13px}
.px-fav-ai__featured{
  position:absolute;z-index:5;top:9px;inset-inline-end:9px;width:34px;height:34px;
  display:grid;place-items:center;border:1px solid rgb(255 207 91 / .38);border-radius:11px;
  background:rgb(74 49 15 / .82);color:#ffd45f;box-shadow:0 7px 18px rgb(92 55 8 / .20)
}
.px-fav-ai__featured .px-icon{width:17px;height:17px}
.px-fav-ai__body{display:grid;gap:8px;padding:13px 13px 12px}
.px-fav-ai__meta{color:#7893b8;font-size:9px;font-weight:900}
.px-fav-card--ai .px-fav-ai__title{
  position:static;inset:auto;min-height:0;max-height:none;padding:0;border:0;border-radius:0;
  display:block;color:var(--px-text);background:transparent;box-shadow:none;
  font-size:13px;font-weight:900;line-height:1.45;overflow:visible;backdrop-filter:none;text-decoration:none;
}
.px-fav-ai__summary{
  margin:0;color:var(--px-muted);font-size:10.5px;line-height:1.65;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden
}
.px-fav-card--ai .px-fav-card__actions{
  position:static;inset:auto;min-height:44px;margin-top:2px;padding:4px;
  opacity:1;transform:none;pointer-events:auto;background:rgb(8 15 29 / .72)
}
html[data-theme="light"] .px-fav-card--ai .px-fav-card__actions{background:rgb(255 255 255 / .82)}
.px-fav-card--ai .px-fav-card__favorite-action{
  width:38px;height:38px;min-width:38px;min-height:38px;padding:0;border:1px solid rgb(255 255 255 / .12);
  border-radius:11px;display:grid;place-items:center;color:#d7e2f2;background:rgb(255 255 255 / .05);cursor:pointer
}
.px-fav-card--ai .px-fav-card__favorite-action.is-saved{color:#fff;border-color:transparent;background:var(--px-accent-gradient)}
.px-fav-card--ai .px-fav-card__favorite-action .px-icon{width:19px;height:19px}
html[data-theme="light"] .px-fav-card--ai .px-fav-card__favorite-action{color:#667b98;border-color:rgb(55 74 112 / .14);background:#f5f8fc}
html[data-theme="light"] .px-fav-card--ai .px-fav-card__favorite-action.is-saved{color:#fff;background:var(--px-accent-gradient)}

@media(max-width:760px){
  /* test247 — phone AI favorites inherit the same restrained glass-frame language
   * as desktop/laptop. The frame is deliberately translucent, but more legible
   * against the phone canvas than test246's nearly invisible border. */
  body.promxai-favorites-modern-page .px-fav-card--ai{
    display:block!important;height:auto!important;min-height:0!important;
    overflow:hidden!important;
    border:1px solid rgb(116 181 238/.34)!important;
    border-radius:19px!important;
    background:linear-gradient(155deg,rgb(13 35 66/.86),rgb(8 24 51/.92))!important;
    box-shadow:
      0 0 0 1px rgb(126 92 246/.055),
      0 12px 30px rgb(0 12 38/.18),
      inset 0 1px 0 rgb(255 255 255/.065)!important;
  }
  body.promxai-favorites-modern-page .px-fav-card--ai .px-fav-ai__stage{
    min-height:108px;border-radius:18px 18px 0 0!important;
    border-bottom:0!important;
  }
  body.promxai-favorites-modern-page .px-fav-card--ai .px-fav-ai__news-media{
    border-radius:18px 18px 0 0!important;
    border-bottom:0!important;
  }
  body.promxai-favorites-modern-page .px-fav-card--ai .px-fav-ai__body{
    display:grid!important;padding:11px 11px 12px;gap:6px;
    border-top:1px solid rgb(121 177 229/.23);
    background:linear-gradient(180deg,rgb(18 49 88/.60),rgb(11 31 62/.76))!important;
  }
  html[data-theme="light"] body.promxai-favorites-modern-page .px-fav-card--ai{
    border-color:rgb(72 113 163/.27)!important;
    background:linear-gradient(155deg,rgb(255 255 255/.96),rgb(237 244 251/.96))!important;
    box-shadow:0 0 0 1px rgb(118 92 230/.035),0 10px 26px rgb(48 75 111/.11),inset 0 1px 0 #fff!important;
  }
  html[data-theme="light"] body.promxai-favorites-modern-page .px-fav-card--ai .px-fav-ai__body{border-top-color:rgb(72 113 163/.20);background:linear-gradient(180deg,rgb(248 251 255/.92),rgb(238 244 251/.94))!important}
  body.promxai-favorites-modern-page .px-fav-card--ai .px-fav-ai__title,
  body.promxai-favorites-modern-page .px-fav-card--ai .px-fav-ai__summary,
  body.promxai-favorites-modern-page .px-fav-card--ai .px-fav-ai__meta{display:block!important;position:static!important;opacity:1!important;visibility:visible!important}
  /* No card-level removal control on Favorites phone view. The shared detail
   * sheet remains the canonical place for Favorite removal and Share. */
  body.promxai-favorites-modern-page .px-fav-card--ai .px-fav-card__actions{display:none!important}
}

/* test231 — every favorite card keeps the exact prompt-column width; only natural height may differ. */
@media(max-width:760px){
  body.promxai-favorites-modern-page .px-favorites-grid > .px-fav-card,
  body.promxai-favorites-modern-page .px-favorites-grid > .px-fav-card--ai{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box}
}

/* test232 — AI favorites keep the canonical favorites column width; height stays content-driven. */
.px-favorites-grid > .px-fav-card--ai{
  width:100%;
  max-width:100%;
}
.px-favorites-ai-detail-host{position:relative;z-index:0}
.px-favorites-ai-toast{
  position:fixed;
  inset-inline-start:50%;
  bottom:max(24px,env(safe-area-inset-bottom));
  z-index:100200;
  transform:translate(-50%,12px);
  opacity:0;
  pointer-events:none;
  padding:9px 13px;
  border:1px solid rgba(117,168,219,.24);
  border-radius:10px;
  background:#132033;
  color:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.3);
  transition:opacity .18s ease,transform .18s ease;
}
.px-favorites-ai-toast.is-visible{opacity:1;transform:translate(-50%,0)}

/* test402 — linked-prompt thumbnail for saved AI skills. */
.px-fav-ai__skill-thumb{width:100%;height:100%;display:block;object-fit:cover;border-radius:10px}
