/* ==========================================================================
   Bigfoot Directories — Public Frontend (Wedding Chapel Theme)
   Drop-in CSS. Targets Tailwind utility classes emitted by the React bundle.
   Palette: blush #d8a7a3 / sage #9caf88 / dusty rose #c08081 / cream #fdf6f5
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bf-blush:       #d8a7a3;
  --bf-sage:        #9caf88;
  --bf-dusty-rose:  #c08081;
  --bf-cream:       #fdf6f5;
  --bf-text:        #3a2e2c;
  --bf-text-soft:   #6b5a57;
  --bf-text-muted:  #8a7976;
  --bf-champagne:   #d4af7a;
  --bf-champagne-dark: #8a6a3a;
  --bf-white:       #ffffff;
  --bf-border:      #ecd9d6;

  --bf-shadow-sm:   0 1px 2px rgba(58, 46, 44, 0.06);
  --bf-shadow-md:   0 4px 14px rgba(58, 46, 44, 0.08);
  --bf-shadow-lg:   0 12px 28px rgba(58, 46, 44, 0.14);

  --bf-radius-sm:   6px;
  --bf-radius-md:   10px;
  --bf-radius-lg:   14px;

  /* 8 / 16 / 24 / 32 / 48 spacing scale */
  --bf-s1: 8px;
  --bf-s2: 16px;
  --bf-s3: 24px;
  --bf-s4: 32px;
  --bf-s5: 48px;

  --bf-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
             "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Root wrapper + page typography ---------- */
.bigfoot-listings-root,
#bigfoot-listings-root {
  font-family: var(--bf-font);
  color: var(--bf-text);
  background: var(--bf-cream);
  line-height: 1.6;
  padding: var(--bf-s5) var(--bf-s3);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bigfoot-listings-root *,
#bigfoot-listings-root * {
  box-sizing: border-box;
}

/* ---------- Hero / H1 treatment ---------- */
.bigfoot-listings-root h1,
#bigfoot-listings-root h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  margin: 0 auto var(--bf-s2);
  max-width: 900px;
  color: var(--bf-text);
}

.bigfoot-listings-root h1::after,
#bigfoot-listings-root h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: var(--bf-s3) auto 0;
  background: linear-gradient(90deg, var(--bf-blush), var(--bf-dusty-rose));
  border-radius: 2px;
}

.bigfoot-listings-root h2,
#bigfoot-listings-root h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: var(--bf-s4) 0 var(--bf-s2);
}

/* Optional subtitle paragraph immediately after h1 */
.bigfoot-listings-root h1 + p,
#bigfoot-listings-root h1 + p {
  text-align: center;
  color: var(--bf-text-soft);
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto var(--bf-s5);
}

/* ---------- Search bar ---------- */
.bigfoot-listings-root input[type="text"],
.bigfoot-listings-root input[type="search"],
#bigfoot-listings-root input[type="text"],
#bigfoot-listings-root input[type="search"] {
  width: 100%;
  max-width: 720px;
  display: block;
  margin: 0 auto var(--bf-s5);
  padding: 14px 20px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--bf-text);
  background: var(--bf-white);
  border: 1px solid var(--bf-border);
  border-radius: 999px;
  box-shadow: var(--bf-shadow-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.bigfoot-listings-root input[type="text"]::placeholder,
.bigfoot-listings-root input[type="search"]::placeholder,
#bigfoot-listings-root input[type="text"]::placeholder,
#bigfoot-listings-root input[type="search"]::placeholder {
  color: var(--bf-text-muted);
}

.bigfoot-listings-root input[type="text"]:focus,
.bigfoot-listings-root input[type="search"]:focus,
#bigfoot-listings-root input[type="text"]:focus,
#bigfoot-listings-root input[type="search"]:focus {
  border-color: var(--bf-blush);
  box-shadow: 0 0 0 4px rgba(216, 167, 163, 0.25), var(--bf-shadow-md);
}

/* ==========================================================================
   Tailwind utility class definitions (mirrored from the React bundle).
   Defining these here means future bundle rebuilds keep working.
   ========================================================================== */

/* ---------- Grid layout (3 / 2 / 1 columns, CSS grid auto-fit) ---------- */
.bigfoot-listings-root .grid,
#bigfoot-listings-root .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--bf-s3);
  max-width: 1200px;
  margin: 0 auto;
}

/* Tailwind responsive grid utilities used by the bundle, hard-coded */
.bigfoot-listings-root .grid-cols-1,
#bigfoot-listings-root .grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.bigfoot-listings-root .md\:grid-cols-2,
#bigfoot-listings-root .md\:grid-cols-2,
.bigfoot-listings-root .sm\:grid-cols-2,
#bigfoot-listings-root .sm\:grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.bigfoot-listings-root .lg\:grid-cols-3,
#bigfoot-listings-root .lg\:grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.bigfoot-listings-root .gap-6,
#bigfoot-listings-root .gap-6 { gap: var(--bf-s3); }
.bigfoot-listings-root .gap-4,
#bigfoot-listings-root .gap-4 { gap: var(--bf-s2); }

/* ---------- Card container ---------- */
.bigfoot-listings-root .bg-white,
#bigfoot-listings-root .bg-white {
  background: var(--bf-white);
}

.bigfoot-listings-root .rounded-lg,
#bigfoot-listings-root .rounded-lg {
  border-radius: var(--bf-radius-lg);
}

.bigfoot-listings-root .shadow-md,
#bigfoot-listings-root .shadow-md {
  box-shadow: var(--bf-shadow-md);
}

.bigfoot-listings-root .shadow-lg,
.bigfoot-listings-root .hover\:shadow-lg:hover,
#bigfoot-listings-root .shadow-lg,
#bigfoot-listings-root .hover\:shadow-lg:hover {
  box-shadow: var(--bf-shadow-lg);
}

.bigfoot-listings-root .overflow-hidden,
#bigfoot-listings-root .overflow-hidden {
  overflow: hidden;
}

.bigfoot-listings-root .transition-shadow,
#bigfoot-listings-root .transition-shadow {
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* Card-level treatment: every direct card gets the photo header + hover lift */
.bigfoot-listings-root .grid > .bg-white,
#bigfoot-listings-root .grid > .bg-white {
  position: relative;
  border: 1px solid var(--bf-border);
  display: flex;
  flex-direction: column;
  padding: 0;
}

.bigfoot-listings-root .grid > .bg-white:hover,
#bigfoot-listings-root .grid > .bg-white:hover {
  transform: translateY(-3px);
}

/* Photo header — CSS background-image placeholder (v2.5.2 ticket: per-chapel images) */
.bigfoot-listings-root .grid > .bg-white::before,
#bigfoot-listings-root .grid > .bg-white::before {
  content: "";
  display: block;
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--bf-blush);
  background-image:
    linear-gradient(180deg, rgba(58,46,44,0) 55%, rgba(58,46,44,0.35) 100%),
    url("https://images.unsplash.com/photo-1519225421980-715cb0215aed?w=600&q=80");
}

.bigfoot-listings-root .grid > .bg-white:nth-child(3n+2)::before,
#bigfoot-listings-root .grid > .bg-white:nth-child(3n+2)::before {
  background-image:
    linear-gradient(180deg, rgba(58,46,44,0) 55%, rgba(58,46,44,0.35) 100%),
    url("https://images.unsplash.com/photo-1464366400600-7168b8af9bc3?w=600&q=80");
}

.bigfoot-listings-root .grid > .bg-white:nth-child(3n+3)::before,
#bigfoot-listings-root .grid > .bg-white:nth-child(3n+3)::before {
  background-image:
    linear-gradient(180deg, rgba(58,46,44,0) 55%, rgba(58,46,44,0.35) 100%),
    url("https://images.unsplash.com/photo-1465495976277-4387d4b0b4c6?w=600&q=80");
}

/* Inner card padding — applied to every direct child of the card except the photo pseudo */
.bigfoot-listings-root .grid > .bg-white > *,
#bigfoot-listings-root .grid > .bg-white > * {
  padding-left: var(--bf-s3);
  padding-right: var(--bf-s3);
}

.bigfoot-listings-root .grid > .bg-white > *:first-child,
#bigfoot-listings-root .grid > .bg-white > *:first-child {
  padding-top: var(--bf-s3);
}

.bigfoot-listings-root .grid > .bg-white > *:last-child,
#bigfoot-listings-root .grid > .bg-white > *:last-child {
  padding-bottom: var(--bf-s3);
}

/* ---------- Featured badge (champagne, top-right over photo) ---------- */
.bigfoot-listings-root .bg-yellow-400,
#bigfoot-listings-root .bg-yellow-400 {
  background: linear-gradient(135deg, var(--bf-champagne) 0%, #e8c896 100%);
}

.bigfoot-listings-root .text-yellow-900,
#bigfoot-listings-root .text-yellow-900 {
  color: var(--bf-champagne-dark);
}

.bigfoot-listings-root .px-3,
#bigfoot-listings-root .px-3 { padding-left: 12px; padding-right: 12px; }
.bigfoot-listings-root .py-1,
#bigfoot-listings-root .py-1 { padding-top: 4px; padding-bottom: 4px; }
.bigfoot-listings-root .text-xs,
#bigfoot-listings-root .text-xs { font-size: 0.72rem; }
.bigfoot-listings-root .font-semibold,
#bigfoot-listings-root .font-semibold { font-weight: 600; }

/* Position the badge in the photo area */
.bigfoot-listings-root .grid > .bg-white .bg-yellow-400,
#bigfoot-listings-root .grid > .bg-white .bg-yellow-400 {
  position: absolute;
  top: var(--bf-s2);
  right: var(--bf-s2);
  z-index: 2;
  padding: 6px 14px !important;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(138, 106, 58, 0.35);
}

.bigfoot-listings-root .grid > .bg-white .bg-yellow-400::before,
#bigfoot-listings-root .grid > .bg-white .bg-yellow-400::before {
  content: "★ ";
  margin-right: 2px;
}

/* ---------- Title ---------- */
.bigfoot-listings-root .text-xl,
#bigfoot-listings-root .text-xl {
  font-size: 1.25rem;
  line-height: 1.35;
}

.bigfoot-listings-root .text-gray-900,
#bigfoot-listings-root .text-gray-900 {
  color: var(--bf-text);
}

.bigfoot-listings-root .mb-2,
#bigfoot-listings-root .mb-2 { margin-bottom: var(--bf-s1); }
.bigfoot-listings-root .mb-4,
#bigfoot-listings-root .mb-4 { margin-bottom: var(--bf-s2); }

.bigfoot-listings-root .grid > .bg-white h3,
#bigfoot-listings-root .grid > .bg-white h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--bf-text);
  margin: 0 0 var(--bf-s1);
  line-height: 1.3;
}

/* ---------- Excerpt ---------- */
.bigfoot-listings-root .text-gray-600,
#bigfoot-listings-root .text-gray-600 {
  color: var(--bf-text-soft);
}

.bigfoot-listings-root .line-clamp-3,
#bigfoot-listings-root .line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
}

.bigfoot-listings-root .grid > .bg-white p,
#bigfoot-listings-root .grid > .bg-white p {
  font-size: 0.95rem;
  color: var(--bf-text-soft);
  margin: 0 0 var(--bf-s3);
  flex-grow: 1;
}

/* ---------- "Add to Compare" checkbox row ---------- */
.bigfoot-listings-root .grid > .bg-white label,
#bigfoot-listings-root .grid > .bg-white label {
  display: inline-flex;
  align-items: center;
  gap: var(--bf-s1);
  font-size: 0.82rem;
  color: var(--bf-text-muted);
  cursor: pointer;
  margin-bottom: var(--bf-s2);
  user-select: none;
  transition: color 0.15s ease;
}

.bigfoot-listings-root .grid > .bg-white label:hover,
#bigfoot-listings-root .grid > .bg-white label:hover {
  color: var(--bf-dusty-rose);
}

.bigfoot-listings-root .grid > .bg-white input[type="checkbox"],
#bigfoot-listings-root .grid > .bg-white input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--bf-sage);
  cursor: pointer;
  margin: 0;
}

/* ---------- Primary CTA: "View Details" button ---------- */
.bigfoot-listings-root .bg-bigfoot-blue,
#bigfoot-listings-root .bg-bigfoot-blue,
.bigfoot-listings-root .grid > .bg-white button,
.bigfoot-listings-root .grid > .bg-white a.button,
#bigfoot-listings-root .grid > .bg-white button,
#bigfoot-listings-root .grid > .bg-white a.button {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: var(--bf-dusty-rose);
  color: var(--bf-white) !important;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(192, 128, 129, 0.28);
  transition: background-color 0.18s ease, transform 0.12s ease,
              box-shadow 0.18s ease;
}

.bigfoot-listings-root .bg-bigfoot-blue:hover,
#bigfoot-listings-root .bg-bigfoot-blue:hover,
.bigfoot-listings-root .grid > .bg-white button:hover,
.bigfoot-listings-root .grid > .bg-white a.button:hover,
#bigfoot-listings-root .grid > .bg-white button:hover,
#bigfoot-listings-root .grid > .bg-white a.button:hover {
  background: #b06f70;
  box-shadow: 0 6px 16px rgba(192, 128, 129, 0.4);
  transform: translateY(-1px);
}

.bigfoot-listings-root .bg-bigfoot-blue:active,
#bigfoot-listings-root .bg-bigfoot-blue:active,
.bigfoot-listings-root .grid > .bg-white button:active,
#bigfoot-listings-root .grid > .bg-white button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(192, 128, 129, 0.3);
}

/* Append a "→" affordance to View Details buttons via text content fallback */
.bigfoot-listings-root .grid > .bg-white button::after,
#bigfoot-listings-root .grid > .bg-white button::after {
  content: " →";
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.18s ease;
}

.bigfoot-listings-root .grid > .bg-white button:hover::after,
#bigfoot-listings-root .grid > .bg-white button:hover::after {
  transform: translateX(3px);
}

/* ---------- Common Tailwind text/color utilities the bundle might use ---------- */
.bigfoot-listings-root .text-white,
#bigfoot-listings-root .text-white { color: var(--bf-white); }
.bigfoot-listings-root .text-center,
#bigfoot-listings-root .text-center { text-align: center; }
.bigfoot-listings-root .flex,
#bigfoot-listings-root .flex { display: flex; }
.bigfoot-listings-root .items-center,
#bigfoot-listings-root .items-center { align-items: center; }
.bigfoot-listings-root .justify-between,
#bigfoot-listings-root .justify-between { justify-content: space-between; }
.bigfoot-listings-root .gap-2,
#bigfoot-listings-root .gap-2 { gap: var(--bf-s1); }

/* ---------- Empty state / loading ---------- */
.bigfoot-listings-root .loading,
.bigfoot-listings-root .empty,
#bigfoot-listings-root .loading,
#bigfoot-listings-root .empty {
  text-align: center;
  padding: var(--bf-s5);
  color: var(--bf-text-muted);
  font-style: italic;
}

/* ---------- Responsive refinement ---------- */
@media (max-width: 640px) {
  .bigfoot-listings-root,
  #bigfoot-listings-root {
    padding: var(--bf-s4) var(--bf-s2);
  }

  .bigfoot-listings-root .grid > .bg-white::before,
  #bigfoot-listings-root .grid > .bg-white::before {
    height: 170px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .bigfoot-listings-root *,
  #bigfoot-listings-root * {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   Content-width breakout — Colin
   The active WP theme (twentytwentyfour) uses is-layout-constrained, which
   caps content width around 620px. That kills the 3-column grid. Override
   the constraint specifically for the listings shortcode wrappers so the
   grid can breathe across the full content viewport (up to max-w-7xl).
   ========================================================================== */
.entry-content .bigfoot-search-container,
.wp-block-post-content .bigfoot-search-container,
.entry-content #bigfoot-listings-root,
.wp-block-post-content #bigfoot-listings-root {
  max-width: none !important;
  width: 100%;
}

/* Also nullify the global-padding container's max-width when our root is a
   descendant. Twentytwentyfour applies max-width via inline custom-property
   on .has-global-padding which we override via increased specificity. */
.entry-content.has-global-padding:has(#bigfoot-listings-root),
.wp-block-post-content.has-global-padding:has(#bigfoot-listings-root) {
  max-width: none;
}

/* Allow the inner max-w-7xl (1200px) wrapper to actually reach 1200px even
   inside a constrained parent. */
.bigfoot-listings-root .max-w-7xl,
#bigfoot-listings-root .max-w-7xl {
  max-width: 1200px;
  width: 100%;
}
