/* Task #1551357 — Personalization & Urgency Layer
   Styles: trending section, new-since-last-visit badges,
   deadline urgency indicators, recently viewed, time-aware header */

/* ── 1. TRENDING IN [STATE] SECTION ─────────────────────────────────────── */
.hp-trending {
  background: #FFFFFF;
  border-top: 1px solid #E5E7EB;
  border-bottom: 1px solid #E5E7EB;
  padding: 2.5rem 1rem;
}
.hp-trending__inner {
  max-width: 1200px;
  margin: 0 auto;
}
.hp-trending__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.hp-trending__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00875A;
  margin-bottom: 0.3rem;
}
.hp-trending__eyebrow-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00875A;
  animation: hp-trending-pulse 2s ease-in-out infinite;
}
@keyframes hp-trending-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hp-trending__heading {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  font-weight: 800;
  color: #0F172A;
  line-height: 1.15;
  margin: 0;
}
.hp-trending__heading span {
  color: #00875A;
}
.hp-trending__browse {
  font-size: 0.875rem;
  font-weight: 600;
  color: #00875A;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.hp-trending__browse:hover {
  color: #00643E;
  text-decoration: underline;
}
.hp-trending__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) {
  .hp-trending__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .hp-trending__grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}
.hp-trending-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  cursor: pointer;
}
.hp-trending-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border-color: #00875A;
  transform: translateY(-1px);
}
.hp-trending-card__cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B7280;
}
.hp-trending-card__name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hp-trending-card__payout {
  font-size: 0.95rem;
  font-weight: 800;
  color: #00875A;
}
.hp-trending-card__deadline {
  font-size: 0.75rem;
  color: #6B7280;
  margin-top: auto;
}
/* Skeleton loader for trending section while geo loads */
.hp-trending--loading .hp-trending-card {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: hp-skeleton-shimmer 1.5s ease infinite;
  pointer-events: none;
}
.hp-trending--loading .hp-trending-card * {
  visibility: hidden;
}
@keyframes hp-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── 2. NEW SINCE LAST VISIT BADGE ──────────────────────────────────────── */
.sr-new-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #6EE7B7;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.4;
}
.sr-new-badge--blue {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #BFDBFE;
}

/* ── 3. DEADLINE URGENCY INDICATORS ─────────────────────────────────────── */
/* On settlement cards */
.sr-urgency-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
  line-height: 1.4;
}
.sr-urgency-pill--red {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
  animation: sr-urgency-blink 2s ease-in-out infinite;
}
@keyframes sr-urgency-blink {
  0%,100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.sr-urgency-pill--amber {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}
.sr-urgency-pill--muted {
  font-size: 0.72rem;
  color: #6B7280;
  font-weight: 500;
}
.sr-urgency-pill--expired {
  font-size: 0.72rem;
  color: #9CA3AF;
  font-style: italic;
}
/* Hero urgency bar on settlement detail pages */
.sr-detail-urgency-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  flex-wrap: wrap;
}
.sr-detail-urgency-bar--red {
  background: #FEF2F2;
  border-bottom: 2px solid #FCA5A5;
  color: #991B1B;
}
.sr-detail-urgency-bar--amber {
  background: #FFFBEB;
  border-bottom: 2px solid #FDE68A;
  color: #78350F;
}
.sr-detail-urgency-bar__icon {
  font-size: 1rem;
}
.sr-detail-urgency-bar__cta {
  background: #DC2626;
  color: #fff;
  padding: 0.3rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s;
}
.sr-detail-urgency-bar--amber .sr-detail-urgency-bar__cta {
  background: #D97706;
}
.sr-detail-urgency-bar__cta:hover {
  opacity: 0.9;
}

/* ── 4. TIME-AWARE HERO SUBTITLE ────────────────────────────────────────── */
#hp-time-subtitle {
  /* Slides in from below when content loads */
  transition: opacity 0.3s ease;
}
#hp-time-subtitle.hp-time-loaded {
  opacity: 1;
}

/* ── 5. RECENTLY VIEWED SETTLEMENTS ────────────────────────────────────── */
.sr-recently-viewed {
  background: #F9FAFB;
  border-top: 1px solid #E5E7EB;
  padding: 1.5rem 1rem;
}
.sr-recently-viewed__inner {
  max-width: 900px;
  margin: 0 auto;
}
.sr-recently-viewed__heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B7280;
  margin: 0 0 0.85rem;
}
.sr-recently-viewed__list {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}
.sr-recently-viewed__list::-webkit-scrollbar {
  display: none;
}
.sr-rv-card {
  flex: 0 0 160px;
  min-width: 0;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.sr-rv-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border-color: #00875A;
}
.sr-rv-card__name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.sr-rv-card__payout {
  font-size: 0.8rem;
  font-weight: 700;
  color: #00875A;
}
.sr-rv-card__label {
  font-size: 0.68rem;
  color: #9CA3AF;
  font-weight: 500;
  margin-top: auto;
}
/* Desktop: sidebar layout */
@media (min-width: 1024px) {
  .sr-recently-viewed {
    padding: 1.25rem 1rem;
  }
  .sr-recently-viewed__list {
    flex-wrap: nowrap;
  }
}
