/*
 * Venues directory in Festival Pro's look: a large square icon, the name in the same
 * big uppercase type, a pin to that venue's own map, and how many events are coming up.
 *
 * The town map (the pin beside the title, and turning the phone to fill the screen)
 * and which venues load are unchanged. Scoped to the venues document, the in-app
 * Venues route, and the embed. Night and day follow the app's data-theme. Festival
 * Pro's own day/night switch must not rewrite it from this page.
 */

body.venues-channels-directory-page,
body.promoter-channels-page #directorySection,
#venueChannelsEmbedRoot {
  --vd-bg: #f4f5f2;
  --vd-card: #ffffff;
  --vd-line: rgba(3, 25, 38, 0.12);
  --vd-text: #0b0f14;
  --vd-muted: #56616a;
  --vd-accent: #468189;
  --vd-chip: rgba(3, 25, 38, 0.06);
  --vd-card-shadow: 0 1px 2px rgba(3, 25, 38, 0.06), 0 8px 22px rgba(3, 25, 38, 0.08);
}

html[data-theme='dark'] body.venues-channels-directory-page,
html[data-theme='dark'] body.promoter-channels-page #directorySection,
html[data-theme='dark'] #venueChannelsEmbedRoot {
  --vd-bg: #07090c;
  --vd-card: #13171c;
  --vd-line: rgba(255, 255, 255, 0.1);
  --vd-text: #f4f6f7;
  --vd-muted: #a3adb4;
  --vd-accent: #77aca2;
  --vd-chip: rgba(255, 255, 255, 0.08);
  --vd-card-shadow: none;
}

body.venues-channels-directory-page {
  --bg: var(--vd-bg);
  --text: var(--vd-text);
  --text-secondary: var(--vd-muted);
  --border: var(--vd-line);
  background: var(--vd-bg) !important;
  color: var(--vd-text);
}

body.promoter-channels-page #directorySection,
#venueChannelsEmbedRoot {
  --bg: var(--vd-bg);
  --text: var(--vd-text);
  --text-secondary: var(--vd-muted);
  background: var(--vd-bg);
  color: var(--vd-text);
}

body.venues-channels-directory-page .promoter-channels-page__scroll-body,
body.venues-channels-directory-page .promoter-channels-page__card,
body.promoter-channels-page #directorySection .promoter-channels-page__scroll-body,
#venueChannelsEmbedRoot .promoter-channels-page__scroll-body {
  background: transparent !important;
}

/* The list itself runs to the screen edges. The title and tabs keep their inset. */
body.venues-channels-directory-page .promoter-channels-page__shell,
body.promoter-channels-page #directorySection .promoter-channels-page__shell,
#venueChannelsEmbedRoot .promoter-channels-page__shell {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.venues-channels-directory-page .promoter-channels-page__intro,
body.promoter-channels-page #directorySection .promoter-channels-page__intro,
#venueChannelsEmbedRoot .promoter-channels-page__intro {
  padding: 18px 18px 6px;
}

body.venues-channels-directory-page .promoter-channels-page__title-row,
body.promoter-channels-page #directorySection .promoter-channels-page__title-row,
#venueChannelsEmbedRoot .promoter-channels-page__title-row {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

body.venues-channels-directory-page .promoter-channels-page__title-row .promoter-channels-page__title,
body.promoter-channels-page #directorySection .promoter-channels-page__title,
#venueChannelsEmbedRoot .promoter-channels-page__title {
  flex: 1 1 auto;
  margin: 0;
  padding: 4px 0 8px !important;
  text-align: left;
  font-family: 'League Spartan', system-ui, sans-serif !important;
  font-size: calc(2.6rem * var(--giggly-dir-card-type-scale, 1)) !important;
  font-weight: 600 !important;
  line-height: 0.95 !important;
  letter-spacing: -0.02em !important;
  text-transform: uppercase !important;
  color: var(--vd-text) !important;
  -webkit-text-fill-color: var(--vd-text) !important;
  background: none !important;
}

body.venues-channels-directory-page .promoter-channels-page__map-btn,
body.promoter-channels-page #directorySection .promoter-channels-page__map-btn,
#venueChannelsEmbedRoot .promoter-channels-page__map-btn {
  position: static !important;
  transform: none !important;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--vd-line) !important;
  border-radius: 999px;
  background: var(--vd-chip) !important;
  color: var(--vd-accent) !important;
}

body.venues-channels-directory-page .promoter-channels-page__map-btn svg,
body.promoter-channels-page #directorySection .promoter-channels-page__map-btn svg,
#venueChannelsEmbedRoot .promoter-channels-page__map-btn svg {
  width: 22px;
  height: 22px;
}

body.venues-channels-directory-page .promoter-channels-page__helper-text,
body.promoter-channels-page #directorySection .promoter-channels-page__helper-text,
#venueChannelsEmbedRoot .promoter-channels-page__helper-text {
  margin: 0 0 12px;
  padding: 0;
  text-align: left;
  font-family: 'League Spartan', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--vd-text);
}

body.venues-channels-directory-page .promoter-channels-page__subnav-sticky,
body.promoter-channels-page #directorySection .promoter-channels-page__subnav-sticky,
#venueChannelsEmbedRoot .promoter-channels-page__subnav-sticky {
  background: var(--vd-bg);
  box-shadow: none;
  justify-content: flex-start;
  padding: 0 18px 10px;
}

body.venues-channels-directory-page .promoter-channels-subnav__pill,
body.promoter-channels-page #directorySection .promoter-channels-subnav__pill,
#venueChannelsEmbedRoot .promoter-channels-subnav__pill {
  font-family: 'League Spartan', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--vd-line) !important;
  background: transparent !important;
  color: var(--vd-muted) !important;
  box-shadow: none !important;
}

body.venues-channels-directory-page .promoter-channels-subnav__pill--active,
body.promoter-channels-page #directorySection .promoter-channels-subnav__pill--active,
#venueChannelsEmbedRoot .promoter-channels-subnav__pill--active {
  background: var(--vd-chip) !important;
  border-color: var(--vd-accent) !important;
  color: var(--vd-text) !important;
}

body.venues-channels-directory-page .promoter-channels-page__loading,
body.venues-channels-directory-page .promoter-channels-page__error,
body.venues-channels-directory-page .promoter-channels-page__subtab-empty,
body.promoter-channels-page #directorySection .promoter-channels-list__loading-msg,
body.promoter-channels-page #directorySection .promoter-channels-list__error-msg,
body.promoter-channels-page #directorySection .promoter-channels-list__empty-msg,
#venueChannelsEmbedRoot .promoter-channels-page__loading,
#venueChannelsEmbedRoot .promoter-channels-page__error {
  padding: 0 18px;
  color: var(--vd-muted);
  font-family: 'League Spartan', system-ui, sans-serif;
}

body.venues-channels-directory-page .promoter-channels-list,
body.promoter-channels-page #directorySection .promoter-channels-list,
#venueChannelsEmbedRoot .promoter-channels-list {
  padding: 4px 0 8px;
}

.vd-look-card.promoter-channels-list__rowwrap {
  position: relative;
  display: block;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0 !important;
  contain: none;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--vd-line, rgba(3, 25, 38, 0.12));
  border-radius: 0;
  background: var(--vd-card, #fff);
  box-shadow: none;
}

.promoter-channels-list__item:has(.vd-look-card) .promoter-channels-list__divider {
  display: none;
}

.vd-look-card .promoter-channels-list__row {
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 116px;
  height: auto;
  padding: 14px max(10px, env(safe-area-inset-right, 0px)) 14px max(12px, env(safe-area-inset-left, 0px));
  border-radius: 0;
  background: transparent;
}

.vd-look-card .promoter-channels-list__row:active {
  border-radius: 0;
  background: var(--vd-chip, rgba(3, 25, 38, 0.06));
}

.vd-look-card .promoter-channels-list__avatar-wrap,
.vd-look-card .promoter-channels-list__avatar-wrap--square {
  flex: 0 0 auto;
  width: 88px !important;
  height: 88px !important;
  min-width: 88px !important;
  min-height: 88px !important;
  border-radius: 14px !important;
  overflow: hidden;
}

.vd-look-card .promoter-channels-list__avatar-img,
.vd-look-card .promoter-channels-list__avatar-fallback {
  width: 88px !important;
  height: 88px !important;
  border-radius: 14px !important;
  object-fit: cover;
}

.vd-look-card .promoter-channels-list__avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'League Spartan', system-ui, sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--vd-accent, #468189) 28%, var(--vd-card, #fff));
  color: var(--vd-text, #0b0f14);
}

.vd-look-card .promoter-channels-list__content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
  /* Pin and Follow sit over this, just left of the arrow. */
  padding-right: 112px;
}

.vd-look-card .promoter-channels-list__name {
  font-family: 'League Spartan', system-ui, sans-serif !important;
  font-size: calc(1.5rem * var(--giggly-dir-card-type-scale, 1)) !important;
  font-weight: 600 !important;
  line-height: 1.02 !important;
  padding-top: 0.06em;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--vd-text, #0b0f14) !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.vd-look-address {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: 'League Spartan', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--vd-muted, #56616a);
}

.vd-look-events {
  display: block;
  margin-top: 2px;
  font-family: 'League Spartan', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vd-accent, #468189);
}

.vd-look-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  color: var(--vd-accent, #468189);
}

.vd-look-go svg {
  display: block;
  width: 22px;
  height: 22px;
}

.vd-look-side {
  position: absolute;
  top: 0;
  bottom: 0;
  right: calc(34px + max(6px, env(safe-area-inset-right, 0px)));
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0;
}

.vd-look-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--vd-line, rgba(3, 25, 38, 0.12));
  border-radius: 999px;
  background: var(--vd-chip, rgba(3, 25, 38, 0.06));
  color: var(--vd-accent, #468189);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.vd-look-pin svg {
  width: 20px;
  height: 20px;
  display: block;
}

.vd-look-side .directory-channel-follow-btn {
  font-family: 'League Spartan', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 8px 12px;
}

/*
 * Android's enlarged chrome sets this Follow button to min-height: 0, which
 * drew it 27px tall beside a 38px pin. A miss opens the venue. 44px is the
 * target the rest of the Android controls use.
 */
html.giggly-touch-shell.giggly-touch-shell-android .vd-look-pin {
  width: 44px;
  height: 44px;
}

html.giggly-touch-shell.giggly-touch-shell-enlarged body.venues-channels-directory-page .vd-look-side .directory-channel-follow-btn,
html.giggly-touch-shell.giggly-touch-shell-enlarged body.promoter-channels-page #directorySection .vd-look-side .directory-channel-follow-btn,
html.giggly-touch-shell.giggly-touch-shell-enlarged #venueChannelsEmbedRoot .vd-look-side .directory-channel-follow-btn {
  min-height: 44px;
  height: auto;
  padding: 8px 12px;
  box-sizing: border-box;
}

body.venues-channels-directory-page .promoter-channels-page__venue-footer,
body.promoter-channels-page #directorySection .promoter-channels-page__venue-footer,
#venueChannelsEmbedRoot .promoter-channels-page__venue-footer {
  padding: 4px 18px 18px;
  color: var(--vd-text);
  font-family: 'League Spartan', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body.venues-channels-directory-page .promoter-channels-page__venue-footer-link,
#venueChannelsEmbedRoot .promoter-channels-page__venue-footer-link {
  color: var(--vd-accent);
  font-weight: 600;
}

body.venues-channels-directory-page .venue-map-rotate-hint {
  display: block;
  margin-top: 6px;
  color: var(--vd-muted);
}

/* The one-venue map (.vd-pin-map) is styled in css/giggly-venue-pin-map.css. */

/* Tapped venue: a ring turns round its icon until the venue page slides in. */
@property --vd-open-spin {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.vd-look-card .promoter-channels-list__row--opening .promoter-channels-list__avatar-wrap {
  position: relative;
}
.vd-look-card .promoter-channels-list__row--opening .promoter-channels-list__avatar-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 4px;
  background: conic-gradient(from var(--vd-open-spin), transparent 0 35%, var(--vd-accent, #468189) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: vd-open-spin 0.8s linear infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes vd-open-spin {
  to { --vd-open-spin: 360deg; }
}
@media (prefers-reduced-motion: reduce) {
  .vd-look-card .promoter-channels-list__row--opening .promoter-channels-list__avatar-wrap::after {
    animation-duration: 2.4s;
  }
}
