/* =========
   Elementor Icon State (SVG شما inline fill دارد، پس !important لازم است)
   ========= */
.lf-fav-el{
  cursor: pointer;
  --lf-fav-active: #31459c;
}

/* active => رنگ */
.lf-fav-el.is-active,
.lf-fav-el.is-active .elementor-icon{
  color: var(--lf-fav-active) !important;
}

/* SVG override (حتی اگر داخل SVG style=fill داشته باشد) */
.lf-fav-el.is-active svg,
.lf-fav-el.is-active .elementor-icon svg{
  fill: var(--lf-fav-active) !important;
  stroke: var(--lf-fav-active) !important;
}

.lf-fav-el.is-active svg *{
  fill: var(--lf-fav-active) !important;
  stroke: var(--lf-fav-active) !important;
}

/* قفل */
.lf-fav-el.is-locked{
  cursor: default;
  opacity: .98;
}

/* =========
   Profile Favorites UI (text black + remove visible)
   ========= */
.lf-favs-wrap{
  --lf-card-bg: #ffffff;
  --lf-card-border: rgba(0,0,0,.08);
  --lf-text: #111111;
  --lf-subtext: rgba(0,0,0,.60);
  --lf-shadow: 0 10px 24px rgba(0,0,0,.10);
  --lf-radius: 18px;
}

.lf-favs-header{ display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.lf-favs-title{ font-size:16px; font-weight:800; color:var(--lf-text); }
.lf-favs-subtitle{ font-size:12px; color:var(--lf-subtext); }

.lf-favs-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.lf-fav-card{
  background: var(--lf-card-bg);
  border: 1px solid var(--lf-card-border);
  border-radius: var(--lf-radius);
  overflow: hidden;
  box-shadow: var(--lf-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.lf-fav-card:hover{ transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0,0,0,.14); }

.lf-fav-media{ position:relative; overflow:hidden; }
.lf-fav-thumb-link{ display:block; position:relative; z-index:1; }
.lf-fav-thumb{
  width:100%;
  object-fit:cover;
  display:block;
  transition: transform .25s ease;
}
.lf-fav-card:hover .lf-fav-thumb{ transform: scale(1.035); }

.lf-fav-thumb--placeholder{
  width:100%;
  aspect-ratio:16/10;
  display:block;
  background: rgba(0,0,0,.05);
}

/* ضربدر روی عکس */
.lf-fav-remove{
  position:absolute;
  top:10px;
  right:10px;
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.95);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:#111;
  z-index:5;
  box-shadow: 0 6px 14px rgba(0,0,0,.10);
  transition: transform .15s ease, opacity .15s ease;
}
.lf-fav-remove:hover{ transform: scale(1.06); }
.lf-fav-remove.is-loading{ opacity:.6; cursor:progress; }
.lf-fav-remove svg{ display:block; }

.lf-fav-body{ padding:12px 12px 14px; display:flex; flex-direction:column; gap:8px; }
.lf-fav-name{ text-decoration:none; color:var(--lf-text); font-weight:800; font-size:14px; line-height:1.35; }
.lf-fav-pill{
  font-size:12px;
  color: rgba(0,0,0,.68);
  background: rgba(0,0,0,.04);
  border:1px solid rgba(0,0,0,.08);
  padding:6px 10px;
  border-radius:999px;
  display:inline-flex;
}

.lf-favs-empty{
  padding:14px;
  border-radius:14px;
  background: rgba(0,0,0,.03);
  border:1px solid rgba(0,0,0,.08);
  color: rgba(0,0,0,.75);
}

.lf-fav-card.is-removing{
  opacity:.45;
  transform: scale(.985);
  transition: all .18s ease;
}
/* ====== SVG Switch (inactive/active) ====== */
.lf-fav-el{
  --lf-fav-inactive: #31459c;
  --lf-fav-active: #31459c;
  color: var(--lf-fav-inactive) !important;
}

.lf-fav-el.is-active{
  color: var(--lf-fav-active) !important;
}

/* نمایش/عدم نمایش دو SVG */
.lf-fav-el .elementor-icon .lf-svg-active{ display:none !important; }
.lf-fav-el.is-active .elementor-icon .lf-svg-active{ display:block !important; }
.lf-fav-el.is-active .elementor-icon .lf-svg-inactive{ display:none !important; }

/* override همه fill های inline داخل svg (حتی style="fill:#31459c") */
.lf-fav-el .elementor-icon svg,
.lf-fav-el .elementor-icon svg *{
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* ====== Remove (X) button FIX ====== */
.lf-fav-media{ position:relative !important; }
.lf-fav-thumb-link{ position:relative !important; z-index:1 !important; }

.lf-fav-remove{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;

  position:absolute !important;
  top:10px !important;
  right:10px !important;

  width:32px !important;
  height:32px !important;
  border-radius:999px !important;

  z-index:2147483647 !important;

  background: rgba(255,255,255,.95) !important;
  border: 1px solid rgba(0,0,0,.18) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.14) !important;

  padding:0 !important;
  line-height:0 !important;

  color:#111 !important;
}

.lf-fav-remove svg{
  width:16px !important;
  height:16px !important;
  display:block !important;
}

.lf-fav-remove svg,
.lf-fav-remove svg *{
  fill: currentColor !important;
  stroke: currentColor !important;
}