/* ============================================================
   SettlementRadar — Premium Cards & Detail Pages
   Task #1248844: World-class conversion design

   Color palette (STRICT):
   - White:  #ffffff, #f5f5f7
   - Blue:   #2563eb
   - Grey:   #6e6e73, #e5e5e7
   - Black:  #1d1d1f
   - Exception: #dc2626 (deadline urgency red)
   - Exception: #22c55e (small green dot for "No Proof Required")
   ============================================================ */

/* ── SETTLEMENT CARDS ─────────────────────────────────────── */
/* Override existing sr-card styles with premium design */

.sr-card {
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border: 1px solid var(--sr-border, #e5e5e7) !important;
  border-radius: var(--sr-radius, 16px) !important;
  box-shadow: var(--sr-shadow-sm) !important;
  padding: var(--sr-card-pad, 28px) !important;
  text-decoration: none !important;
  color: inherit !important;
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out !important;
  position: relative !important;
  overflow: hidden !important;
  height: 100% !important;
}

.sr-card:hover {
  box-shadow: var(--sr-shadow-md) !important;
  transform: translateY(-2px) !important;
  border-color: #e5e5e7 !important;
}

.sr-card:active {
  transform: translateY(0) !important;
}

/* Remove urgent card border overrides */
.sr-card--urgent {
  border-color: #e5e5e7 !important;
}

/* ── Card Head: Hide old logo-based header ─────────────── */
.sr-card__head {
  display: none !important;
}

/* ── Card Body: Redesigned layout ──────────────────────── */
.sr-card__body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  gap: 0 !important;
}

/* ── Category Badge ────────────────────────────────────── */
.sr-card__category-badge {
  display: inline-block;
  background: #f5f5f7;
  color: #6e6e73;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 12px;
  line-height: 1.4;
  align-self: flex-start;
}

/* ── Card Title (new h3 in body) ───────────────────────── */
.sr-card__title-new {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #1d1d1f !important;
  line-height: 1.3 !important;
  margin: 0 0 10px !important;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Estimated Payout ──────────────────────────────────── */
.sr-card__payout {
  font-size: 18px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 8px;
  line-height: 1.3;
}

/* ── Deadline ──────────────────────────────────────────── */
.sr-card__deadline {
  font-size: 14px;
  color: #6e6e73;
  margin-bottom: 8px;
  line-height: 1.4;
}

.sr-card__deadline--urgent {
  color: #dc2626;
  font-weight: 600;
}

/* ── Description Snippet ───────────────────────────────── */
.sr-card__snippet {
  font-size: 15px;
  color: #6e6e73;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* ── No Proof Required Badge ───────────────────────────── */
.sr-card__no-proof {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6e6e73;
  margin-bottom: 16px;
}

.sr-card__no-proof-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* ── View Details CTA ──────────────────────────────────── */
.sr-card__view-details {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: #2563eb;
  font-size: 14px;
  font-weight: 500;
  margin-top: auto;
  padding-top: 4px;
  text-decoration: none;
  transition: gap 0.2s ease-out;
}

.sr-card:hover .sr-card__view-details {
  gap: 8px;
}

.sr-card__view-details svg {
  transition: transform 0.2s ease-out;
}

.sr-card:hover .sr-card__view-details svg {
  transform: translateX(2px);
}

/* ── Hide old card elements ────────────────────────────── */
.sr-card .sr-card__amount,
.sr-card .sr-card__amount-label,
.sr-card .ds-payout-bar,
.sr-card .ds-timer,
.sr-card .ds-timer--compact,
.sr-card .sr-card__badges,
.sr-card .sr-card__cta,
.sr-card .sr-score-badge,
.sr-card .ds-badge {
  display: none !important;
}

/* ── Card Grid ─────────────────────────────────────────── */
.sr-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px !important;
  align-items: stretch !important;
}

@media (max-width: 1024px) {
  .sr-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .sr-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 0 16px;
  }

  .sr-card {
    padding: 24px !important;
  }

  .sr-card__title-new {
    font-size: 18px !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   SETTLEMENT DETAIL PAGE
   ═══════════════════════════════════════════════════════════ */

/* ── Breadcrumb ────────────────────────────────────────── */
.breadcrumb-nav {
  font-size: 14px !important;
  color: #6e6e73 !important;
  margin-bottom: 16px !important;
}

.breadcrumb-nav a {
  color: #2563eb !important;
  text-decoration: none !important;
  font-weight: 400 !important;
}

.breadcrumb-nav a:hover {
  text-decoration: underline !important;
}

.breadcrumb-sep {
  color: #6e6e73 !important;
  margin: 0 6px !important;
}

.breadcrumb-current {
  color: #6e6e73 !important;
  font-size: 14px !important;
}

/* ── Detail Header Title ───────────────────────────────── */
.detail-header h1 {
  font-size: clamp(28px, 5vw, 40px) !important;
  font-weight: 700 !important;
  color: #1d1d1f !important;
  letter-spacing: -0.02em !important;
  line-height: 1.15 !important;
  margin-bottom: 8px !important;
}

/* ── Detail Category Badge ─────────────────────────────── */
.detail-meta-row .card-category,
.detail-meta-row .card-deadline,
.card-category {
  background: #f5f5f7 !important;
  color: #6e6e73 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border-radius: 100px !important;
  padding: 4px 12px !important;
  border: none !important;
}

/* ── Company/Subtitle ──────────────────────────────────── */
.detail-header .detail-company-name,
.detail-header .detail-subtitle {
  font-size: 18px !important;
  color: #6e6e73 !important;
  margin-bottom: 8px !important;
}

/* ── Key Facts Bar ─────────────────────────────────────── */
.sd-key-facts {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: #f5f5f7;
  border-radius: 12px;
  padding: 24px 32px;
  margin: 24px 0 32px;
}

.sd-key-facts__item {
  flex: 1;
  min-width: 0;
}

.sd-key-facts__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6e6e73;
  margin-bottom: 6px;
  line-height: 1.3;
}

.sd-key-facts__value {
  font-size: 18px;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1.3;
}

.sd-key-facts__value--blue {
  color: #2563eb;
}

@media (max-width: 640px) {
  .sd-key-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 24px;
  }
}

/* ── Description Section ───────────────────────────────── */
.sd-description {
  max-width: 720px;
}

.sd-description p {
  font-size: 17px !important;
  line-height: 1.7 !important;
  color: #333 !important;
  margin-bottom: 24px !important;
}

.sd-description h2,
.sd-description h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin-top: 32px;
  margin-bottom: 16px;
}

/* ── Filing CTA Section ────────────────────────────────── */
.sd-filing-cta {
  text-align: center;
  background: #f5f5f7;
  border-radius: 16px;
  padding: 48px 32px;
  margin: 40px 0;
}

.sd-filing-cta__title {
  font-size: 28px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 8px;
}

.sd-filing-cta__sub {
  font-size: 16px;
  color: #6e6e73;
  margin-bottom: 28px;
}

.sd-filing-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb !important;
  color: #ffffff !important;
  font-size: 18px;
  font-weight: 600;
  height: 56px;
  padding: 0 40px;
  border-radius: 28px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease-out, transform 0.15s ease-out;
  letter-spacing: -0.01em;
}

.sd-filing-cta__btn:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

.sd-filing-cta__btn:active {
  transform: scale(0.98);
}

.sd-filing-cta__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff !important;
  color: #2563eb !important;
  font-size: 18px;
  font-weight: 600;
  height: 56px;
  padding: 0 40px;
  border-radius: 28px;
  border: 2px solid #2563eb;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease-out, transform 0.15s ease-out;
  margin-left: 12px;
  letter-spacing: -0.01em;
}

.sd-filing-cta__btn-secondary:hover {
  background: #f5f5f7 !important;
  color: #2563eb !important;
}

.sd-filing-cta__guarantee {
  font-size: 13px;
  color: #6e6e73;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .sd-filing-cta {
    padding: 36px 20px;
  }

  .sd-filing-cta__title {
    font-size: 22px;
  }

  .sd-filing-cta__btn,
  .sd-filing-cta__btn-secondary {
    width: 100%;
    margin-left: 0;
    margin-bottom: 12px;
    padding: 0 24px;
  }
}

/* ── Related Settlements (detail page) ─────────────────── */
.sd-related-settlements__heading {
  font-size: 28px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

/* ── Mobile Sticky CTA ────────────────────────────────── */
.sd-mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 990;
  background: #2563eb;
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  /* Offset for Ping chat bubble — 80px from bottom */
  bottom: 0;
  transition: transform 0.3s ease-out;
}

.sd-mobile-sticky-cta--hidden {
  transform: translateY(100%);
}

.sd-mobile-sticky-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  background: transparent;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.sd-mobile-sticky-cta__btn:hover {
  color: #ffffff;
  text-decoration: none;
}

/* Only show on mobile */
@media (max-width: 768px) {
  .sd-mobile-sticky-cta {
    display: block;
  }

  /* Push Ping chat bubble up when sticky CTA is visible */
  body.sd-sticky-cta-visible #ping-chat-bubble,
  body.sd-sticky-cta-visible .ping-bubble,
  body.sd-sticky-cta-visible [id*="ping"],
  body.sd-sticky-cta-visible .sr-ping-trigger {
    bottom: 86px !important;
  }
}


/* ── Existing CTA Box Premium Override ──────────────────── */
/* The .cta-box elements on settlement detail pages need
   the premium treatment defined in the task spec */
.cta-box {
  text-align: center !important;
  background: #f5f5f7 !important;
  border-radius: var(--sr-radius, 16px) !important;
  padding: 48px 32px !important;
  margin: 32px 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.cta-box h3 {
  font-size: 28px !important;
  font-weight: 600 !important;
  color: #1d1d1f !important;
  margin-bottom: 8px !important;
  letter-spacing: -0.02em !important;
}

.cta-box > p {
  font-size: 16px !important;
  color: #6e6e73 !important;
  margin-bottom: 24px !important;
}

.cta-box .btn-primary,
.cta-box .btn.btn-primary,
.cta-box .dual-cta-primary,
.cta-box .filing-cta-main-btn {
  background: #2563eb !important;
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 40px !important;
  border-radius: 28px !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  letter-spacing: -0.01em !important;
  box-shadow: none !important;
}

.cta-box .btn-primary:hover,
.cta-box .dual-cta-primary:hover,
.cta-box .filing-cta-main-btn:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

.cta-box .btn-secondary,
.cta-box .dual-cta-secondary {
  background: #ffffff !important;
  color: #2563eb !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 40px !important;
  border-radius: 28px !important;
  border: 2px solid #2563eb !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

.cta-box .btn-secondary:hover,
.cta-box .dual-cta-secondary:hover {
  background: #f5f5f7 !important;
  color: #2563eb !important;
}

.cta-box .cta-reassurance {
  font-size: 13px !important;
  color: #6e6e73 !important;
  margin-top: 16px !important;
}

@media (max-width: 640px) {
  .cta-box {
    padding: 36px 20px !important;
  }

  .cta-box h3 {
    font-size: 22px !important;
  }

  .cta-box .btn-primary,
  .cta-box .filing-cta-main-btn,
  .cta-box .dual-cta-primary,
  .cta-box .btn-secondary,
  .cta-box .dual-cta-secondary {
    width: 100% !important;
    padding: 0 24px !important;
    margin-bottom: 12px !important;
  }
}

/* ── Detail Page Summary Text ──────────────────────────── */
.detail-summary {
  font-size: 17px !important;
  line-height: 1.7 !important;
  color: #333 !important;
  max-width: 720px !important;
  margin-bottom: 8px !important;
}

/* ── Detail Company Name ───────────────────────────────── */
.detail-company {
  font-size: 18px !important;
  color: #6e6e73 !important;
  margin-bottom: 8px !important;
}

/* ── Urgency title badges: premium aligned ─────────────── */
.ue-title-badge {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  border-radius: 100px !important;
  padding: 4px 12px !important;
  margin-left: 8px !important;
  vertical-align: middle !important;
}

/* ── Detail page body content (article body) ───────────── */
.detail-body p,
.article-body p,
.settlement-body p {
  font-size: 17px !important;
  line-height: 1.7 !important;
  color: #333 !important;
  margin-bottom: 24px !important;
}

.detail-body h2,
.article-body h2,
.settlement-body h2 {
  font-size: 24px !important;
  font-weight: 600 !important;
  color: #1d1d1f !important;
  margin-top: 32px !important;
  margin-bottom: 16px !important;
}

.detail-body h3,
.article-body h3,
.settlement-body h3 {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #1d1d1f !important;
  margin-top: 24px !important;
  margin-bottom: 12px !important;
}


/* ═══════════════════════════════════════════════════════════
   BLOG / GUIDE / NEWS CARDS
   ═══════════════════════════════════════════════════════════ */

/* ── Blog Cards ────────────────────────────────────────── */
.blog-card {
  background: #ffffff !important;
  border: 1px solid var(--sr-border, #e5e5e7) !important;
  border-radius: var(--sr-radius, 16px) !important;
  box-shadow: var(--sr-shadow-sm) !important;
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out !important;
  overflow: hidden !important;
  text-decoration: none !important;
}

.blog-card:hover {
  box-shadow: var(--sr-shadow-md) !important;
  transform: translateY(-2px) !important;
}

.blog-card-top {
  padding: 24px 24px 0 !important;
}

.blog-card h2 {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #1d1d1f !important;
  line-height: 1.3 !important;
  margin-bottom: 8px !important;
}

.blog-card:hover h2 {
  color: #2563eb !important;
}

.blog-card-excerpt {
  font-size: 15px !important;
  color: #6e6e73 !important;
  line-height: 1.5 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  padding: 0 24px !important;
  margin-bottom: 0 !important;
}

.blog-card-date,
.blog-card-read-time {
  font-size: 13px !important;
  color: #6e6e73 !important;
}

.blog-card-cta {
  color: #2563eb !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.blog-card-footer {
  padding: 16px 24px 24px !important;
}

/* Blog category chips */
.blog-category-chip {
  background: #f5f5f7 !important;
  color: #6e6e73 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border-radius: 100px !important;
  padding: 4px 12px !important;
  border: none !important;
}

/* ── Guide/Hub Cards ───────────────────────────────────── */
.hub-card {
  background: #ffffff !important;
  border: 1px solid var(--sr-border, #e5e5e7) !important;
  border-radius: var(--sr-radius, 16px) !important;
  box-shadow: var(--sr-shadow-sm) !important;
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out !important;
  text-decoration: none !important;
  overflow: hidden !important;
}

.hub-card:hover {
  box-shadow: var(--sr-shadow-md) !important;
  transform: translateY(-2px) !important;
}

.hub-card__title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #1d1d1f !important;
  line-height: 1.3 !important;
}

.hub-card:hover .hub-card__title {
  color: #2563eb !important;
}

.hub-card__badge {
  background: #f5f5f7 !important;
  color: #6e6e73 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border-radius: 100px !important;
  padding: 4px 12px !important;
  border: none !important;
}

/* ── News Hub Cards ────────────────────────────────────── */
.nh-card,
.news-card {
  background: #ffffff !important;
  border: 1px solid var(--sr-border, #e5e5e7) !important;
  border-radius: var(--sr-radius, 16px) !important;
  box-shadow: var(--sr-shadow-sm) !important;
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out !important;
}

.nh-card:hover,
.news-card:hover {
  box-shadow: var(--sr-shadow-md) !important;
  transform: translateY(-2px) !important;
}

/* ── News Filter Tabs ──────────────────────────────────── */
.nh-filter-tab {
  background: #f5f5f7 !important;
  color: #6e6e73 !important;
  border: 1px solid var(--sr-border, #e5e5e7) !important;
  border-radius: 100px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.nh-filter-tab.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}


/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .sr-card:hover,
  .blog-card:hover,
  .hub-card:hover,
  .nh-card:hover,
  .news-card:hover {
    transform: none !important;
  }

  .sd-mobile-sticky-cta {
    transition: none !important;
  }

  .sr-card__view-details svg,
  .sr-card__view-details {
    transition: none !important;
  }
}
