/* BibBuy dark theme
   Loaded after Tailwind on every page. Pages are written with Tailwind's light
   utility classes; this file remaps them to the dark palette, so one file
   controls the whole look. Selectors start with "html body" to win over the
   Tailwind CDN styles, which are injected at runtime. */

:root {
  --bb-bg: #0a0a0a;          /* page */
  --bb-surface: #131313;     /* cards */
  --bb-surface-2: #1b1b1b;   /* raised / hover */
  --bb-line: #242424;        /* borders */
  --bb-line-soft: #1c1c1c;
  --bb-text: #f5f5f5;
  --bb-text-2: #b8b8b8;
  --bb-text-3: #8c8c8c;
  --bb-text-4: #5f5f5f;
  --bb-orange: #ff5a1f;
  --bb-orange-soft: rgba(255, 90, 31, 0.12);
  --bb-green: #3ddc84;
  --bb-red: #ff6b6b;
  --bb-amber: #fbbf24;
  --bb-blue: #60a5fa;
  color-scheme: dark;
}

html body {
  background: var(--bb-bg);
  color: var(--bb-text);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
html body ::selection { background: var(--bb-orange); color: #fff; }
html body.bg-white, html body.bg-gray-50 { background-color: var(--bb-bg); }

/* ── Type ─────────────────────────────────────────────────────────────── */
html body h1, html body h2, html body h3 { letter-spacing: -0.025em; }
html body .font-black { letter-spacing: -0.035em; }

/* ── Surfaces ─────────────────────────────────────────────────────────── */
html body .bg-white { background-color: var(--bb-surface); }
html body .bg-gray-50 { background-color: var(--bb-bg); }
html body .bg-gray-100 { background-color: var(--bb-surface-2); }
html body .bg-gray-900, html body .bg-gray-950 { background-color: #000; }
html body nav.bg-white, html body .bg-white\/95 { background-color: rgba(10, 10, 10, 0.82); backdrop-filter: saturate(160%) blur(14px); }
html body .hover\:bg-gray-50:hover, html body .hover\:bg-gray-100:hover { background-color: var(--bb-surface-2); }
html body .hover\:bg-gray-200:hover { background-color: #262626; }
html body .hover\:bg-orange-50:hover { background-color: var(--bb-orange-soft); }

/* Big dark call-to-action blocks get a subtle edge so they read on black */
html body .bg-gray-900.rounded-3xl, html body section.bg-gray-900 { background: linear-gradient(180deg, #161616, #0d0d0d); border: 1px solid var(--bb-line); }

/* ── Text ─────────────────────────────────────────────────────────────── */
html body .text-gray-900, html body .text-gray-800 { color: var(--bb-text); }
html body .text-gray-700 { color: #d4d4d4; }
html body .text-gray-600 { color: var(--bb-text-2); }
html body .text-gray-500 { color: var(--bb-text-3); }
html body .text-gray-400 { color: #737373; }
html body .text-gray-300 { color: var(--bb-text-4); }
html body .text-gray-100 { color: #2a2a2a; }
html body .hover\:text-gray-900:hover, html body .hover\:text-gray-700:hover { color: #fff; }
html body .hover\:text-gray-600:hover { color: var(--bb-text-2); }

/* ── Lines ────────────────────────────────────────────────────────────── */
html body .border-gray-100, html body .border-gray-200, html body .border-gray-300 { border-color: var(--bb-line); }
html body .border-gray-50, html body .border-gray-800 { border-color: var(--bb-line-soft); }
html body .divide-gray-50 > * + *, html body .divide-gray-100 > * + * { border-color: var(--bb-line-soft); }
html body .border-dashed { border-color: #2e2e2e; }

/* ── Orange accents ───────────────────────────────────────────────────── */
html body .bg-orange-50 { background-color: var(--bb-orange-soft); }
html body .text-orange-500, html body .text-orange-600, html body .text-orange-400 { color: var(--bb-orange); }
html body .border-orange-100, html body .border-orange-200 { border-color: rgba(255, 90, 31, 0.28); }
html body .hover\:border-orange-300:hover, html body .hover\:border-orange-400:hover { border-color: rgba(255, 90, 31, 0.55); }
html body .bg-orange-500 { background-color: var(--bb-orange); }
html body .hover\:bg-orange-600:hover { background-color: #ff6f3c; }
html body .text-orange-800 { color: #ffb08f; }
html body .text-orange-100 { color: rgba(255, 255, 255, 0.85); }

/* ── Status colours ───────────────────────────────────────────────────── */
html body .bg-green-50 { background-color: rgba(61, 220, 132, 0.1); }
html body .text-green-600, html body .text-green-700 { color: var(--bb-green); }
html body .border-green-100, html body .border-green-200 { border-color: rgba(61, 220, 132, 0.25); }
html body .bg-red-50 { background-color: rgba(255, 107, 107, 0.1); }
html body .text-red-500, html body .text-red-600 { color: var(--bb-red); }
html body .text-red-400 { color: #ff8a8a; }
html body .border-red-100, html body .border-red-200 { border-color: rgba(255, 107, 107, 0.3); }
html body .hover\:bg-red-50:hover { background-color: rgba(255, 107, 107, 0.1); }
html body .bg-amber-50, html body .bg-yellow-50 { background-color: rgba(251, 191, 36, 0.1); }
html body .text-amber-600, html body .text-amber-700, html body .text-yellow-700 { color: var(--bb-amber); }
html body .border-amber-100, html body .border-amber-200, html body .border-yellow-200 { border-color: rgba(251, 191, 36, 0.28); }
html body .bg-blue-50 { background-color: rgba(96, 165, 250, 0.1); }
html body .text-blue-500, html body .text-blue-600 { color: var(--bb-blue); }

/* ── Forms ────────────────────────────────────────────────────────────── */
html body input:not([type=checkbox]):not([type=radio]), html body select, html body textarea {
  background-color: #0f0f0f;
  border-color: #2a2a2a;
  color: var(--bb-text);
}
html body input::placeholder, html body textarea::placeholder { color: #5c5c5c; }
html body input:focus, html body select:focus, html body textarea:focus { border-color: transparent; }
html body .focus-within\:ring-orange-500:focus-within, html body .focus\:ring-orange-500:focus { --tw-ring-color: var(--bb-orange); }
html body input[type=date]::-webkit-calendar-picker-indicator { filter: invert(0.8); }

/* ── Shadows: replace soft grey shadows with a quiet edge glow ────────── */
html body .shadow-sm, html body .shadow, html body .shadow-md, html body .shadow-lg, html body .shadow-xl,
html body [class*="shadow-[0_2px_20px"] { box-shadow: 0 0 0 1px var(--bb-line), 0 12px 40px rgba(0, 0, 0, 0.5); }
html body .hover\:shadow-md:hover, html body .hover\:shadow-lg:hover, html body .hover\:shadow-sm:hover { box-shadow: 0 0 0 1px rgba(255, 90, 31, 0.35), 0 16px 40px rgba(0, 0, 0, 0.6); }

/* ── Long-form text (Terms, Privacy) ──────────────────────────────────── */
html body .prose h2 { color: var(--bb-text); }
html body .prose p, html body .prose li { color: var(--bb-text-2); }
html body .prose strong { color: var(--bb-text); }

/* ── Details / FAQ ────────────────────────────────────────────────────── */
html body details summary::marker { color: var(--bb-text-4); }

/* ── Shared components used by the redesigned pages ───────────────────── */
.bb-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bb-text-3); }
.bb-glow { position: absolute; inset: auto; width: 720px; height: 720px; border-radius: 9999px;
  background: radial-gradient(closest-side, rgba(255, 90, 31, 0.22), rgba(255, 90, 31, 0) 70%); pointer-events: none; filter: blur(10px); }
.bb-tile { background: var(--bb-surface); border: 1px solid var(--bb-line); border-radius: 18px; transition: border-color .2s, transform .2s, background .2s; }
.bb-tile:hover { border-color: rgba(255, 90, 31, 0.5); background: #161616; transform: translateY(-2px); }
.bb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 9999px;
  border: 1px solid var(--bb-line); background: var(--bb-surface); color: var(--bb-text-2); font-size: 12px; font-weight: 600; transition: border-color .2s, color .2s; }
.bb-chip:hover { border-color: rgba(255, 90, 31, 0.5); color: #fff; }
.bb-stat { font-variant-numeric: tabular-nums; }
.bb-grid-bg { background-image: linear-gradient(var(--bb-line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--bb-line-soft) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%); }

/* Sold listings: details dimmed, big orange SOLD stamp running diagonally across */
.bb-sold { position: relative; overflow: hidden; container-type: inline-size; }
.bb-sold > * { opacity: .35; }
.bb-sold::after {
  content: 'SOLD'; position: absolute; top: 50%; left: 50%; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-20deg);
  padding: .15em .55em; border: 4px solid var(--bb-orange); border-radius: 12px;
  color: var(--bb-orange); font-size: min(3.25rem, 17cqw); font-weight: 900; letter-spacing: .14em; line-height: 1;
  background: rgba(10, 10, 10, .55); box-shadow: 0 0 32px rgba(255, 90, 31, .35);
}
