/* Anunțurile salvate (public/js/favorite.js): inimioara pe carduri, butonul de pe anunț, istoricul prețului,
   alerta de preț, legătura din meniu și pagina /anunturi/salvate */

/* Inimioara de pe carduri */
[data-fav] { position: relative; }
.fv-heart { position: absolute; z-index: 3; top: 12px; right: 12px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #0f172a; box-shadow: 0 4px 12px rgba(15, 23, 42, .22); cursor: pointer; transition: transform .15s, color .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.fv-heart::before { content: ""; position: absolute; inset: -4px; border-radius: inherit; } /* țintă de 46 px */
.fv-heart svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: fill .15s; }
.fv-heart:hover { transform: scale(1.06); color: #e11d48; }
.fv-heart:focus-visible { outline: 3px solid rgba(37, 99, 235, .5); outline-offset: 2px; }
.fv-heart[aria-pressed="true"] { color: #e11d48; }
.fv-heart[aria-pressed="true"] svg { fill: currentColor; }
.fv-heart.is-pop svg { animation: fv-pop .35s ease; }
.fv-heart--left { right: auto; left: 10px; top: 10px; }
.hl-card[data-fav] .hl-card__tags { right: 50px; }
@media (max-width: 480px) { .hl-card .fv-heart { width: 34px; height: 34px; top: 10px; right: 10px; } .hl-card .fv-heart svg { width: 18px; height: 18px; } .hl-card[data-fav] .hl-card__tags { right: 44px; } }
@keyframes fv-pop { 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .fv-heart, .fv-heart svg { transition: none; animation: none !important; } }

/* Legătura din meniu, cu numărul de anunțuri salvate */
.fv-nav { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: #374151; }
.fv-nav:hover { background: #f3f4f6; color: #e11d48; }
.fv-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fv-nav.has-items svg { fill: #e11d48; stroke: #e11d48; }
.fv-nav__n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e11d48; color: #fff; font-size: .68rem; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.fv-nav__n[hidden] { display: none; }
.fv-mwrap { display: flex; align-items: center; gap: 2px; }
/* pe tabletă (768–1023 px) meniul de sus nu mai are loc pentru inimioară: lista rămâne în subsol și în mesajul „Vezi lista” */
@media (min-width: 768px) and (max-width: 1023.98px) { .ut-desktop-actions .fv-nav { display: none; } }
@media (min-width: 768px) { .fv-mwrap .fv-nav { display: none; } }

/* Mesajul scurt după salvare */
.fv-toast { position: fixed; z-index: 80; left: 50%; bottom: 24px; max-width: calc(100vw - 32px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #0f172a; color: #fff; font-size: .88rem; font-weight: 600; box-shadow: 0 12px 30px rgba(15, 23, 42, .35); transition: opacity .2s, transform .2s; }
.fv-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.fv-toast a { color: #93c5fd; text-decoration: underline; white-space: nowrap; }
@media (max-width: 767px) { .fv-toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }

/* Pagina anunțului: scăderea de preț, butoanele, istoricul, alerta */
.fv-drop { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: .8rem; font-weight: 700; line-height: 1.35; text-align: left; }
.fv-drop svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fv-droprow { margin: -10px 0 12px; }
.fv-drop--bar { margin: 0; font-size: .86rem; padding: 6px 12px; }
.fv-was { display: block; margin-top: 2px; font-size: .82rem; color: #6b7280; }
.fv-was s { color: #9ca3af; }
.fv-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 16px; }
.fv-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 14px; border-radius: 10px; border: 1px solid #d1d5db; background: #fff; color: #111827; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.fv-btn:hover { border-color: #9ca3af; background: #f9fafb; }
.fv-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
.fv-btn svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fv-btn[data-fav-btn][aria-pressed="true"] { border-color: #fecdd3; background: #fff1f2; color: #be123c; }
.fv-btn[data-fav-btn][aria-pressed="true"] svg { fill: currentColor; }
.fv-btn[aria-expanded="true"], .fv-btn.is-on { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.fv-alert { margin: -6px 0 18px; padding: 14px 16px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; font-size: .9rem; color: #334155; }
.fv-alert[hidden] { display: none; }
.fv-alert p { margin: 0 0 10px; line-height: 1.5; }
.fv-alert form { display: grid; gap: 10px; }
.fv-alert__row { display: flex; flex-wrap: wrap; gap: 8px; }
.fv-alert input[type="email"] { flex: 1 1 220px; min-width: 0; min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1px solid #cbd5e1; font: inherit; font-size: .95rem; background: #fff; }
.fv-alert input[type="email"]:focus { outline: 2px solid rgba(37, 99, 235, .35); border-color: #2563eb; }
.fv-alert small { display: block; font-size: .78rem; line-height: 1.45; color: #64748b; }
.fv-alert small a { color: #2563eb; text-decoration: underline; }
.fv-primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 16px; border: 0; border-radius: 10px; background: #2563eb; color: #fff; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.fv-primary:hover { background: #1d4ed8; }
.fv-primary[disabled] { opacity: .6; cursor: default; }
.fv-link { padding: 0; border: 0; background: none; color: #b91c1c; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; text-decoration: underline; }
.fv-msg { margin: 0; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .86rem; }
.fv-msg--ok { background: #dcfce7; color: #166534; }
.fv-msg--err { background: #fee2e2; color: #991b1b; }
.fv-msg[hidden] { display: none; }
.fv-hist { margin: -6px 0 20px; border-radius: 12px; border: 1px solid #e5e7eb; background: #fff; }
.fv-hist summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: .9rem; color: #111827; list-style: none; }
.fv-hist summary::-webkit-details-marker { display: none; }
.fv-hist summary svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #2563eb; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fv-hist summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid #6b7280; border-bottom: 2px solid #6b7280; transform: rotate(45deg); transition: transform .15s; }
.fv-hist[open] summary::after { transform: rotate(-135deg); }
.fv-hist ol { margin: 0; padding: 0 14px 10px; list-style: none; }
.fv-hist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 9px 0; border-top: 1px solid #f1f5f9; font-size: .88rem; }
.fv-hist li span:first-child { color: #6b7280; }
.fv-hist li strong { text-align: right; color: #111827; }
.fv-hist li em { grid-column: 1 / -1; font-style: normal; font-size: .8rem; font-weight: 700; }
.fv-hist .is-down em { color: #15803d; }
.fv-hist .is-up em { color: #b45309; }
.fv-hist__note { margin: 0; padding: 0 14px 12px; font-size: .76rem; color: #6b7280; line-height: 1.45; }

/* Pagina /anunturi/salvate */
.fv-page { padding: 28px 0 48px; }
.fv-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.fv-h1 { margin: 0 0 6px; font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 800; letter-spacing: -.02em; color: #0f172a; }
.fv-lead { margin: 0 0 18px; color: #475569; line-height: 1.55; max-width: 70ch; }
.fv-note { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: #eff6ff; color: #1e3a8a; font-size: .88rem; line-height: 1.5; }
.fv-note a { color: #1d4ed8; font-weight: 700; text-decoration: underline; }
.fv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; font-size: .88rem; color: #475569; }
.fv-tools select { min-height: 38px; padding: 6px 10px; border-radius: 10px; border: 1px solid #cbd5e1; background: #fff; font: inherit; font-size: .88rem; }
.fv-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.fv-card { position: relative; min-width: 0; display: flex; flex-direction: column; border-radius: 16px; background: #fff; border: 1px solid #e6ebf2; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 18px -10px rgba(15, 23, 42, .18); overflow: hidden; }
.fv-card__link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.fv-card__img { position: relative; aspect-ratio: 4 / 3; background: #e2e8f0; }
.fv-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fv-card__price { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 9px; border-radius: 8px; background: #fff; color: #0f172a; font-size: .88rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 4px 12px rgba(15, 23, 42, .25); }
.fv-card__body { display: grid; gap: 4px; padding: 10px 12px 12px; }
.fv-card__title { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.3; color: #0f172a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fv-card:hover .fv-card__title { color: #1d4ed8; }
.fv-card__meta { margin: 0; font-size: .8rem; color: #64748b; }
.fv-card__drop { justify-self: start; margin-top: 2px; }
.fv-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 12px 10px; border-top: 1px solid #f1f5f9; font-size: .8rem; }
.fv-card__foot label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: #334155; cursor: pointer; }
.fv-card__foot input { width: 16px; height: 16px; accent-color: #2563eb; }
.fv-card--gone { padding: 14px; gap: 8px; justify-content: space-between; background: #f8fafc; }
.fv-card--gone p { margin: 0; font-size: .88rem; color: #475569; }
.fv-empty { padding: 34px 18px; border-radius: 16px; border: 1px dashed #cbd5e1; background: #fff; text-align: center; color: #475569; }
.fv-empty svg { width: 40px; height: 40px; margin: 0 auto 8px; fill: none; stroke: #e11d48; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fv-empty h2 { margin: 0 0 6px; font-size: 1.1rem; color: #0f172a; }
.fv-empty p { margin: 0 auto 14px; max-width: 46ch; line-height: 1.5; }
.fv-skel { height: 300px; border-radius: 16px; background: linear-gradient(90deg, #f1f5f9, #e2e8f0, #f1f5f9); background-size: 200% 100%; animation: fv-sk 1.2s linear infinite; }
@keyframes fv-sk { to { background-position: -200% 0; } }
.fv-box { max-width: 560px; margin: 0 auto; padding: 24px; border-radius: 16px; background: #fff; border: 1px solid #e6ebf2; box-shadow: 0 8px 24px -14px rgba(15, 23, 42, .3); }
.fv-box .fv-h1 { font-size: 1.4rem; }
.fv-box form { margin-top: 14px; }
.fv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
