/* ══════════════════════════════════════════════════════════════
   Settlement Card v2 Redesign — Task #918982
   Glass card style · Company avatar · Drawer · Pro metallic
   Loads after settlement-listing.css — overrides dir-card styles
   ══════════════════════════════════════════════════════════════ */

/* ── Glass Card Upgrade ───────────────────────────────────────
   The a.dir-card becomes a frosted-glass surface.
   Bottom padding reserves space for the floating action buttons. */
a.dir-card {
  background: rgba(255,255,255,0.90) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  border: 1px solid rgba(226,232,240,0.85) !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 18px rgba(0,0,0,0.055) !important;
  padding: 1.1rem 1.2rem 2.75rem !important;
  transition: transform 0.25s cubic-bezier(0.19,1,0.22,1), box-shadow 0.25s cubic-bezier(0.19,1,0.22,1), border-color 0.2s !important;
}
a.dir-card:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(80,200,120,0.4) !important;
  box-shadow: 0 0 0 2px rgba(80,200,120,0.09), 0 8px 30px rgba(0,0,0,0.09) !important;
}
a.dir-card:active {
  transform: translateY(-1px) !important;
}

/* ── Hide legacy card elements (replaced by sr2 elements) ──── */
a.dir-card .dir-card-hero,
a.dir-card .dir-card-top,
a.dir-card .dir-card-company,
a.dir-card .dir-card-cta {
  display: none !important;
}
/* Override the legacy title class — sr2-title handles display */
a.dir-card .dir-card-title {
  display: none !important;
}
/* Override the legacy stats class */
a.dir-card .dir-card-stats {
  display: none !important;
}

/* ── Card Header: Avatar + Company + Badges ──────────────────
   The three key trust signals at the top of each card.          */
.sr2-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  min-width: 0;
}

/* Company initial avatar — colored circle/rounded-square */
.sr2-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  text-transform: uppercase;
  user-select: none;
}

.sr2-company-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

/* ── "No Proof Required" badge — Electric Violet ────────────
   #8B5CF6 (violet-500) — unmissable on white/glass cards      */
.sr2-noproof-badge {
  flex-shrink: 0;
  font-size: 0.63rem;
  font-weight: 700;
  background: #8B5CF6;
  color: #fff;
  padding: 0.16rem 0.52rem;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* Trending badge (small flame pill) */
.sr2-trending-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ff6b00, #ff9500);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: 0.03em;
  box-shadow: 0 1px 4px rgba(255,107,0,0.3);
}

/* ── Settlement Title ────────────────────────────────────────
   Two-line clamp for visual consistency across the grid.       */
.sr2-title {
  font-size: 0.94rem;
  font-weight: 650;
  color: #1a1d21;
  line-height: 1.4;
  margin: 0 0 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
a.dir-card:hover .sr2-title {
  color: #15803d;
}

/* ── Payout — The Number Everyone Cares About ───────────────
   Large, bold, #50C878 (emerald-ish). Stands out immediately. */
.sr2-payout-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.1rem;
}
.sr2-payout {
  font-size: 1.45rem;
  font-weight: 800;
  color: #50C878;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 0.4rem;
}
.sr2-payout-na {
  font-size: 0.86rem;
  font-weight: 500;
  color: #9ca3af;
  font-style: italic;
  margin: 0 0 0.4rem;
}

/* ── Deadline ────────────────────────────────────────────────
   Urgency color coding: red = <7d, amber = 8-30d, green = open */
.sr2-deadline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.79rem;
  font-weight: 600;
  color: #6b7280;
  flex-wrap: wrap;
}
.sr2-deadline.urgent { color: #dc2626; }
.sr2-deadline.warning { color: #b45309; }
.sr2-deadline.open { color: #15803d; }

/* Pulsing urgent badge */
.sr2-urgent-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 100px;
  padding: 0.14rem 0.48rem;
  white-space: nowrap;
  animation: sr2BadgePulse 2s ease-in-out infinite;
}
.sr2-urgent-badge.warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
  animation: none;
}
@keyframes sr2BadgePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.72; }
}

/* ── Details Toggle — "Details ▾" ───────────────────────────
   Span (not button) inside the <a> — preventDefault on click. */
.sr2-details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.26rem 0.62rem;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 0.6rem;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
}
.sr2-details-toggle:hover {
  border-color: #8B5CF6;
  color: #7C3AED;
  background: rgba(139,92,246,0.04);
}
.sr2-details-toggle.open {
  border-color: #8B5CF6;
  color: #7C3AED;
  background: rgba(139,92,246,0.06);
}
.sr2-toggle-arrow {
  display: inline-block;
  font-style: normal;
  transition: transform 0.2s ease;
  line-height: 1;
}
.sr2-details-toggle.open .sr2-toggle-arrow {
  transform: rotate(180deg);
}

/* ── Drawer — secondary details ─────────────────────────────
   Hidden by default. .open class shows it via JS toggle.      */
.sr2-drawer {
  display: none;
  border-top: 1px solid #f1f5f9;
  padding: 0.6rem 0 0.2rem;
  margin-top: 0.4rem;
}
.sr2-drawer.open {
  display: block;
}
.sr2-drawer-row {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.15rem 0;
  font-size: 0.75rem;
  color: #6b7280;
}
.sr2-drawer-row-label {
  font-weight: 600;
  color: #9ca3af;
  min-width: 68px;
  flex-shrink: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sr2-drawer-row-val {
  color: #374151;
  font-weight: 500;
  line-height: 1.4;
}

/* ── Pro Tier — Metallic Gradient Border ────────────────────
   Applied via CSS background clip trick. Looks premium.       */

/* Pro upsell inline card in settlements grid */
.sr2-pro-inline {
  background:
    linear-gradient(#f0fdf4, #f0fdf4) padding-box,
    linear-gradient(135deg, rgba(192,192,192,0.35), rgba(232,232,232,0.55), rgba(200,200,200,0.35)) border-box;
  border: 1.5px solid transparent !important;
}

/* Pro badge — chrome/silver gradient */
.sr2-pro-badge {
  background: linear-gradient(135deg, #b0b0b0 0%, #e2e2e2 50%, #c0c0c0 100%) !important;
  color: #2d2d2d !important;
  border: none !important;
}

/* Pro CTA button — subtle gradient fill instead of flat */
.sr2-pro-cta-btn,
.prc-cta--primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
}
.sr2-pro-cta-btn:hover,
.prc-cta--primary:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
}

/* ── Pricing page Pro+ card — Premium metallic border ────────
   Replaces the existing purple #4f46e5 border with silver      */
.prc-card--proplus {
  background:
    linear-gradient(170deg, rgba(99,102,241,0.035) 0%, #ffffff 28%) padding-box,
    linear-gradient(135deg, #C0C0C0 0%, #E4E4E4 45%, #D0D0D0 75%, #C0C0C0 100%) border-box !important;
  border: 2px solid transparent !important;
  box-shadow: 0 8px 40px rgba(150,150,160,0.18), 0 2px 8px rgba(0,0,0,0.06) !important;
}
.prc-card--proplus:hover {
  background:
    linear-gradient(170deg, rgba(99,102,241,0.04) 0%, #ffffff 28%) padding-box,
    linear-gradient(135deg, #b0b0b0 0%, #d8d8d8 45%, #c4c4c4 75%, #b0b0b0 100%) border-box !important;
  box-shadow: 0 12px 48px rgba(150,150,160,0.24), 0 2px 8px rgba(0,0,0,0.07) !important;
}
/* Keep Pro card green border treatment */
.prc-card--pro {
  background: #ffffff;
  border: 2px solid #16a34a !important;
}

/* ── Mobile responsive ───────────────────────────────────────
   Full-width stacked cards — payout + deadline always visible. */
@media (max-width: 768px) {
  .sr2-payout {
    font-size: 1.3rem;
  }
  .sr2-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.72rem;
  }
  a.dir-card {
    padding: 1rem 1rem 2.5rem !important;
  }
}
@media (max-width: 480px) {
  .sr2-payout { font-size: 1.2rem; }
  .sr2-title { font-size: 0.9rem; -webkit-line-clamp: 3; }
  .sr2-card-header { gap: 0.4rem; }
  .sr2-avatar { width: 30px; height: 30px; font-size: 0.68rem; }
}
