/* FindDito prototype styles — small set of pieces Tailwind's CDN utilities can't express cleanly. */

/*
 * Single source of truth for the brand palette. Change a value here and it
 * flows through everywhere: Tailwind utility classes (bg-brown, text-clay,
 * etc. — see the `tailwind.config` blocks in includes/header.php,
 * includes/admin-header.php, frichaprit/login.php and maintenance.php, which
 * all point their color tokens at these same variables) plus the CSS rules
 * below and any inline SVG that reads them via getComputedStyle (assets/js/maps.js).
 * (Email templates in emails/ keep literal hex — email clients don't support
 * CSS custom properties.)
 */
:root {
  --color-brown: #734d35;
  --color-brown-dark: #8A5F41;
  --color-clay: #A77F60;
  --color-cream: #F3E4C9;
  --color-soft: #F7F4F1;
  --color-surface: #EDE9E6;
  --color-ink: #2D2926;
  --color-muted: #706A65;
  --color-leaf: #66765F;
  --color-white: #FFFFFF;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--color-ink);
  background: var(--color-soft);
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Figtree', system-ui, sans-serif;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }

/* Leaflet map container needs an explicit height or it renders collapsed */
.map-canvas { width: 100%; height: 100%; min-height: 320px; background: var(--color-surface); }

/* FindDito marker pin — normal/selected share the default fill; sponsored/user override it */
.fd-marker {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  transform: translateY(-4px);
}
.fd-marker svg { filter: drop-shadow(0 2px 3px rgba(45,41,38,.35)); }
.fd-marker svg circle.fd-pin-dot { fill: var(--color-white); }
.fd-marker svg path.fd-pin-body { fill: var(--color-brown-dark); }
.fd-marker.fd-marker--sponsored svg path.fd-pin-body { fill: var(--color-clay); }
.fd-marker.fd-marker--selected { transform: translateY(-6px) scale(1.18); z-index: 999 !important; }
.fd-marker.fd-marker--user svg path.fd-pin-body { fill: var(--color-leaf); }

.leaflet-popup-content-wrapper {
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 8px 24px rgba(45,41,38,.18);
}
.leaflet-popup-content { margin: 0; width: 240px !important; }
.leaflet-popup-tip { box-shadow: none; }
.fd-popup { font-family: 'DM Sans', sans-serif; }
.fd-popup img { width: 100%; height: 96px; object-fit: cover; border-radius: 14px 14px 0 0; }
.fd-popup-body { padding: 10px 12px 12px; }

/* Favorite heart icon (place-card.php, place.php) */
.fd-fav-icon { fill: none; stroke: var(--color-brown); }
.fd-fav-icon.is-favorited { fill: var(--color-brown-dark); }

/* Skeleton loading shimmer for lazy sections */
.fd-skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-cream) 37%, var(--color-surface) 63%);
  background-size: 400% 100%;
  animation: fd-shimmer 1.4s ease infinite;
}
@keyframes fd-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Toast */
#fd-toast-container { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 1100; }
.fd-toast {
  background: var(--color-ink); color: var(--color-white); padding: .65rem 1.1rem; border-radius: 999px;
  font-size: .875rem; font-weight: 600; box-shadow: 0 8px 20px rgba(0,0,0,.25);
  margin-top: .5rem; opacity: 0; transform: translateY(8px); transition: all .25s ease;
}
.fd-toast.show { opacity: 1; transform: translateY(0); }

[x-cloak], .fd-hidden { display: none !important; }

/* Visible focus state for keyboard nav (accessibility, section 48) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-brown);
  outline-offset: 2px;
}
.outline-none {
    outline: 2px solid transparent!important;
    outline-offset: 2px;
}
