/* Canonical account-backed favorites UI: navbar badge + guest account prompt. */
.sgg-nav-favorites {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e3e4e6;
  border-radius: 999px;
  background: #fff;
  color: #111;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.sgg-nav-favorites:hover,
.sgg-nav-favorites:focus-visible {
  border-color: #c9cbcf;
  background: #f7f7f5;
  color: #111;
  transform: translateY(-1px);
}

.sgg-nav-favorites > .bi-heart,
.sgg-nav-favorites > .bi-heart-fill {
  font-size: 20px;
  line-height: 1;
}

.sgg-nav-favorite-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-flex;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.heart-btn.is-favorite-loading,
.sgg-fav-btn.is-favorite-loading {
  cursor: wait;
  opacity: .72;
}

.heart-btn.is-favorite .bi-heart-fill,
.sgg-fav-btn.is-favorite .bi-heart-fill {
  transform: scale(1.04);
}

html.sgg-favorite-modal-open,
body.sgg-favorite-modal-open {
  overflow: hidden;
}

.sgg-favorite-account-modal[hidden] {
  display: none !important;
}

.sgg-favorite-account-modal {
  position: fixed;
  z-index: 100080;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 17, 17, .48);
  backdrop-filter: blur(5px);
}

.sgg-favorite-account-dialog {
  position: relative;
  width: min(100%, 480px);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .09);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .2);
}

.sgg-favorite-account-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e5e3;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 18px;
}

.sgg-favorite-account-content {
  padding: 34px 34px 30px;
}

.sgg-favorite-account-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 16px;
  background: #f3f2ee;
  color: #111;
  font-size: 24px;
}

.sgg-favorite-account-content h2 {
  margin: 0 48px 10px 0;
  color: #111;
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -.035em;
}

.sgg-favorite-account-content p {
  margin: 0;
  color: #686b70;
  font-size: .98rem;
  line-height: 1.55;
}

.sgg-favorite-account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 26px;
}

.sgg-favorite-account-actions .btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 750;
}

.sgg-favorite-account-footnote {
  margin-top: 16px !important;
  color: #898b8f !important;
  font-size: .78rem !important;
}

@media (max-width: 575.98px) {
  .sgg-nav-favorites {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .sgg-favorite-account-modal {
    align-items: end;
    padding: 10px;
  }

  .sgg-favorite-account-dialog {
    border-radius: 24px;
  }

  .sgg-favorite-account-content {
    padding: 30px 22px 24px;
  }

  .sgg-favorite-account-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sgg-nav-favorites { transition: none; }
}

.sgg-menu-favorite-count {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  vertical-align: 1px;
}
