/* Tombol favorit (hati) — dipakai kartu daftar dan halaman detail front_v2.
   Lihat templates/front_v2/partials/favorite_button.html */

/* Kelas dasar sengaja hanya mengatur warna, kursor, dan tata letak isi.
   Latar, padding, dan border diserahkan ke variannya supaya varian 'bare'
   bisa menumpang gaya tombol yang sudah ada (mis. .mobile-action-btn) tanpa
   ditimpa dari sini. */
.v2-fav {
  cursor: pointer;
  color: #5c5f66;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  transition: color .18s ease, transform .18s ease;
}

.v2-fav-icon {
  fill: none;
  stroke: currentColor;
  transition: fill .18s ease, stroke .18s ease, transform .18s ease;
}

.v2-fav:hover { color: #e5484d; }
.v2-fav:active .v2-fav-icon { transform: scale(.88); }

.v2-fav.is-fav { color: #e5484d; }
.v2-fav.is-fav .v2-fav-icon { fill: #e5484d; stroke: #e5484d; }

.v2-fav:focus-visible {
  outline: 2px solid #e5484d;
  outline-offset: 3px;
  border-radius: 6px;
}

/* Varian kartu: bulat putih di sudut gambar. Posisi dan ukurannya mengikuti
   .tp-tour-wishlist bawaan tema supaya tata letak kartu tidak bergeser. */
.v2-fav--card {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .18);
}

.v2-fav--card:hover { transform: scale(1.06); }

/* Varian inline: ikon + teks, sejajar dengan tombol "Share" di halaman detail. */
.v2-fav--inline {
  padding: 0;
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .v2-fav,
  .v2-fav-icon,
  .v2-fav--card:hover { transition: none; transform: none; }
}

/* -- ajakan masuk untuk tamu ---------------------------------------------
   Modal sendiri, bukan modal Bootstrap: halaman v2 tidak semuanya memuat
   bootstrap-bundle (home memakai varian ringan), dan tombol hati ada di
   semuanya. */

.v2-fav-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.v2-fav-modal[hidden] { display: none; }

body.v2-fav-modal-open { overflow: hidden; }

.v2-fav-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 31, 51, .55);
  backdrop-filter: blur(2px);
  animation: v2FavFade .18s ease;
}

.v2-fav-modal-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 32px 28px 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(12, 31, 51, .28);
  text-align: center;
  animation: v2FavPop .2s ease;
}

.v2-fav-modal-x {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: #9aa4b2;
  cursor: pointer;
}

.v2-fav-modal-x:hover { color: #0c1f33; }

.v2-fav-modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffeaea;
  color: #e5484d;
}

.v2-fav-modal-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #0c1f33;
}

.v2-fav-modal-text {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #5c6b7a;
}

.v2-fav-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v2-fav-modal-btn {
  display: block;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid #d9e1ea;
  font-size: 15px;
  font-weight: 600;
  color: #0c1f33;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}

.v2-fav-modal-btn:hover { background: #f4f7fa; border-color: #c3cedb; color: #0c1f33; }

.v2-fav-modal-btn--primary {
  background: #e5484d;
  border-color: #e5484d;
  color: #fff;
}

.v2-fav-modal-btn--primary:hover { background: #cf3b40; border-color: #cf3b40; color: #fff; }

.v2-fav-modal-dismiss {
  margin-top: 16px;
  border: 0;
  background: none;
  font-size: 13px;
  color: #8894a3;
  cursor: pointer;
  text-decoration: underline;
}

.v2-fav-modal-dismiss:hover { color: #5c6b7a; }

@keyframes v2FavFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes v2FavPop {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .v2-fav-modal-backdrop,
  .v2-fav-modal-panel { animation: none; }
}
