/*
 * AVD Map Guide — Around The Area
 * All colors/fonts driven by CSS variables set from admin settings
 */

/* ── CSS VARIABLE DEFAULTS ────────────────────────
   These are fallbacks if the inline <style> block hasn't run yet.
   The shortcode render() outputs the real values. */
.avdsr-around {
  --aa-bg:          #2b2b2b;
  --aa-text:        #ffffff;
  --aa-sub:         rgba(255,255,255,0.55);
  --aa-tab:         rgba(255,255,255,0.45);
  --aa-tab-active:  #ffffff;
  --aa-accent:      #c9a84c;
  --aa-nav-bg:      #c9a84c;
  --aa-nav-color:   #ffffff;
  --aa-card-bg:     #1a1a1a;
  --aa-card-name:   #ffffff;
  --aa-card-review: rgba(255,255,255,0.6);
  --aa-star:        #f5a623;
  --aa-font:        'Cormorant Garamond';
  --aa-title-size:  4rem;
}

/* Google Font loaded dynamically based on setting */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@700&family=Playfair+Display:wght@700&family=DM+Sans:wght@400;500;600;700&family=Bricolage+Grotesque:wght@700&family=Montserrat:wght@700&family=Raleway:wght@700&display=swap');

/* ── SECTION ────────────────────────────────────── */
.avdsr-around {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--aa-bg);
  padding: 64px 0 48px;
  overflow: hidden;
  position: relative;
}

/* ── HEADER ─────────────────────────────────────── */
.avdsr-around-header {
  text-align: center;
  margin-bottom: 36px;
  padding: 0 24px;
}
.avdsr-around-title {
  font-family: var(--aa-font), 'Cormorant Garamond', Georgia, serif;
  font-size: var(--aa-title-size, clamp(2.2rem, 6vw, 4rem));
  font-weight: 700;
  color: var(--aa-text);
  margin: 0 0 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
}
.avdsr-around-subtitle {
  font-size: .9rem;
  color: var(--aa-sub);
  margin: 0;
}

/* ── CATEGORY TABS ──────────────────────────────── */
.avdsr-around-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 36px;
  padding: 0 24px;
  flex-wrap: wrap;
}
.avdsr-around-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 68px;
  position: relative;
  padding-bottom: 10px;
}
.avdsr-around-tab-icon {
  font-size: 1.4rem;
  line-height: 1;
  opacity: .5;
  transition: opacity .2s;
}
.avdsr-around-tab-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--aa-tab);
  transition: color .2s;
}
.avdsr-around-tab:hover .avdsr-around-tab-icon { opacity: .75; }
.avdsr-around-tab.avdsr-active .avdsr-around-tab-icon { opacity: 1; }
.avdsr-around-tab.avdsr-active .avdsr-around-tab-label { color: var(--aa-tab-active); }
.avdsr-around-tab.avdsr-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: var(--aa-accent);
  border-radius: 2px;
}

/* ── CAROUSEL ───────────────────────────────────── */
.avdsr-around-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 64px;
}
.avdsr-around-track-outer {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.avdsr-around-track {
  display: flex;
  gap: 12px;
  transition: transform .35s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}

/* ── CARDS ──────────────────────────────────────── */
.avdsr-around-card {
  flex: 0 0 calc(20% - 10px);
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--aa-card-bg);
  aspect-ratio: 3/4;
  transition: transform .2s, box-shadow .2s;
}
.avdsr-around-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.avdsr-around-card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--aa-card-bg);
}
.avdsr-around-card-img--empty {
  background: linear-gradient(135deg, #3a3a3a, #222);
}
.avdsr-around-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.92) 0%,
    rgba(0,0,0,.45) 45%,
    transparent 75%
  );
}
.avdsr-around-card-save {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 5px 8px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.avdsr-around-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 10px 12px 10px;
}
.avdsr-around-card-name {
  font-size: .72rem;
  font-weight: 700;
  color: var(--aa-card-name);
  letter-spacing: .02em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avdsr-around-card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}
.avdsr-around-stars { display: inline-flex; gap: 1px; }
.avdsr-around-star        { font-size: .82rem; color: rgba(255,255,255,.2); }
.avdsr-around-star.full   { color: var(--aa-star); }
.avdsr-around-star.half   { color: var(--aa-star); opacity: .55; }
.avdsr-around-card-reviews {
  font-size: .6rem;
  color: var(--aa-card-review);
}
.avdsr-around-card-yelp {
  display: flex;
  justify-content: flex-end;
}
.avdsr-around-yelp-logo {
  font-family: 'Arial Black', sans-serif;
  font-size: .82rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.01em;
}
.avdsr-around-yelp-logo span { color: #ff1a1a; font-size: 1rem; line-height: .7; }
.avdsr-around-card-link {
  position: absolute;
  inset: 0;
  z-index: 4;
}

/* ── NAV ARROWS ─────────────────────────────────── */
.avdsr-around-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--aa-nav-bg);
  border: none;
  color: var(--aa-nav-color);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s, transform .2s;
  flex-shrink: 0;
}
.avdsr-around-nav:hover { opacity: .85; }
.avdsr-around-nav:disabled { opacity: .2; cursor: default; }
.avdsr-around-nav--prev { left: 10px; }
.avdsr-around-nav--next { right: 10px; }

/* ── SKELETON ───────────────────────────────────── */
.avdsr-around-skeleton {
  flex: 0 0 calc(20% - 10px);
  aspect-ratio: 3/4;
  border-radius: 8px;
  background: linear-gradient(90deg, #333 25%, #404040 50%, #333 75%);
  background-size: 200% 100%;
  animation: avdsr-skeleton 1.4s ease infinite;
}
@keyframes avdsr-skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── STATES ─────────────────────────────────────── */
.avdsr-around-empty {
  color: rgba(255,255,255,.4);
  font-size: .9rem;
  padding: 48px 0;
  text-align: center;
  width: 100%;
}
.avdsr-around-error {
  background: #fff8e1;
  border: 1px solid #ffd54f;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: .875rem;
  color: #7a5c00;
  margin: 16px 24px;
}
.avdsr-around-error code {
  background: rgba(0,0,0,.07);
  padding: .1rem .4rem;
  border-radius: 3px;
}
.avdsr-around-attribution {
  text-align: center;
  margin: 20px 0 0;
  font-size: .72rem;
  color: rgba(255,255,255,.25);
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1100px) {
  .avdsr-around-card { flex: 0 0 calc(25% - 9px); }
  .avdsr-around-skeleton { flex: 0 0 calc(25% - 9px); }
}
@media (max-width: 860px) {
  .avdsr-around-card, .avdsr-around-skeleton { flex: 0 0 calc(33.333% - 8px); }
  .avdsr-around-carousel-wrap { padding: 0 48px; }
}
@media (max-width: 600px) {
  .avdsr-around-card, .avdsr-around-skeleton { flex: 0 0 calc(50% - 6px); }
  .avdsr-around-carousel-wrap { padding: 0 40px; }
  .avdsr-around-nav { width: 36px; height: 36px; font-size: 1.2rem; }
}

/* ── SOURCE BADGES ──────────────────────────────── */
.avdsr-around-card-badge { display: flex; justify-content: flex-end; }

.avdsr-around-yelp-logo {
  font-family: 'Arial Black', sans-serif;
  font-size: .82rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.01em;
}
.avdsr-around-yelp-logo span { color: #ff1a1a; font-size: 1rem; line-height: .7; }

.avdsr-around-google-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  font-family: Arial, sans-serif;
  font-size: .75rem;
  font-weight: 700;
  color: #4285F4;
  line-height: 1;
  flex-shrink: 0;
}
