/* css/event-extras.css — the event page's extra Instagram posts (film-strip tiles that load Instagram's own player), links to other sites, documents
   (rulebook…) and the hero's Rulebook pill. Tokens, buttons, focus rings: events-shared.css. The player mechanics (.ev-ig__*) come from event-watch.css, which is loaded with it.
   Markup: includes/event_view_extras.php. Behaviour: js/event-watch.js. */

/* ---------- Hero pill (inside the kicker row, beside "Watch the reel") ---------- */
.ev-vhero__doc {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 36px; padding: .3rem .85rem; border-radius: 999px;
  border: 1px solid rgba(231, 207, 159, .75); background: rgba(10, 35, 66, .55); color: #fff; font-size: .84rem; font-weight: 700; text-decoration: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background-color .2s, transform .2s var(--ev-ease), border-color .2s;
}
.ev-vhero__doc:hover { background: rgba(10, 35, 66, .82); border-color: var(--ev-gold); transform: translateY(-1px); }
.ev-vhero__doc i { color: var(--ev-gold); font-size: .78rem; }

/* ---------- More from Instagram: a row of small cards that scrolls sideways ----------
   Simple and short: each card is 240px wide and shows the post at about 70% size (Instagram's player lays itself out fluidly and its height depends on
   its width, so it is always loaded at ONE width, 336px, and scaled down: every card then measures the same way, its text stays sharp and its buttons work). Every card has the SAME height. A post taller than the card
   fades out at the bottom (the link under the card opens the whole post); a shorter one, a reel, simply ends. No scroll bar: the arrows, a swipe or
   the keyboard move the row, and a fade shows which edge has more. */
.ev-posts { --ig-w: 336px; --card-w: 240px; --s: .714286; --tile-h: 24rem; }          /* --s = --card-w / --ig-w */
.ev-posts__list--reels { --tile-h: 18rem; }                                           /* a reel is about 373px tall at 336px wide: 266px scaled */
.ev-posts__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: -.4rem 0 .5rem; min-height: 44px; }
.ev-posts__hint { margin: 0; color: var(--ev-muted); font: 700 .8rem/1.2 var(--body-font, Lato, sans-serif); letter-spacing: .1em; text-transform: uppercase; }
.ev-posts__nav { display: flex; gap: .5rem; }
.ev-posts__nav[hidden] { display: none; }
.ev-posts__btn {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1.5px solid var(--ev-line); border-radius: 50%; background: #fff; color: var(--ev-ink);
  font-size: .85rem; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .15s;
}
@media (hover: hover) { .ev-posts__btn:not(:disabled):hover { background: var(--ev-ink); border-color: var(--ev-ink); color: #fff; } }
.ev-posts__btn:not(:disabled):active { transform: scale(.94); }
.ev-posts__btn:disabled { opacity: .35; cursor: default; }

/* the notice (and its one button) for a visitor who has not allowed Instagram posts: shown by the script, so never a dead button */
.ev-posts__consent {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; max-width: 62ch; margin: 0 0 1rem; padding: .8rem 1.1rem;
  border: 1px dashed var(--ev-line); border-radius: 14px; background: rgba(255, 255, 255, .6); color: var(--ev-text); line-height: 1.55;
}
.ev-posts__consent p { margin: 0; }
.ev-posts__lead { flex: 1 1 14rem; font-size: 1rem; }
.ev-posts__fine { flex: 1 1 100%; color: var(--ev-muted); font-size: .88rem; }
.ev-posts__allow {
  display: inline-flex; align-items: center; min-height: 44px; padding: .35rem 1.05rem; border: 1.5px solid var(--ev-ink); border-radius: 999px; cursor: pointer;
  background: var(--ev-gold); color: var(--ev-ink); font: 700 .9rem/1 var(--body-font, Lato, sans-serif); transition: background-color .2s, transform .15s;
}
.ev-posts__allow:hover { background: #dcc08f; }
.ev-posts__allow:active { transform: scale(.97); }

.ev-posts__rail {
  --fade-l: 0px; --fade-r: 2.4rem;                       /* a fade only on the side that has more to scroll to (data-edge says which) */
  position: relative;                                    /* the screen-reader-only text inside off-screen cards is absolutely positioned: without this the strip does not clip it and the PAGE scrolls sideways */
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none;
  padding: .4rem 1rem .8rem .4rem; margin-inline: -.4rem;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
}
.ev-posts__rail::-webkit-scrollbar { display: none; }
[data-ev-posts][data-edge="middle"] .ev-posts__rail { --fade-l: 1.8rem; }
[data-ev-posts][data-edge="end"] .ev-posts__rail { --fade-l: 1.8rem; --fade-r: 0px; }
[data-ev-posts][data-edge="none"] .ev-posts__rail { --fade-r: 0px; }
.ev-posts__rail:focus-visible { outline: 3px solid var(--ev-ink); outline-offset: -3px; box-shadow: inset 0 0 0 6px rgba(201, 164, 107, .75); }   /* inside: the strip's edge fade would cut an outer ring off */
.ev-posts__list { display: flex; align-items: flex-start; gap: 1.1rem; margin: 0; padding: 0 1.2rem 0 0; list-style: none; width: max-content; min-width: 100%; }
.ev-posts__list--one { width: auto; padding-right: 0; }
.ev-posts__item { flex: 0 0 var(--card-w); display: grid; gap: .6rem; min-width: 0; scroll-snap-align: start; scroll-margin-inline: .4rem; }

/* The card. Before its player is there it is a quiet face (the kind of post, a play button, what a tap does). The player is invisible while it loads,
   then sits at the top of the card, scaled to fit, and is as tall as it reports (--ig-h, in its own pixels). */
.ev-ig--tile { width: 100%; height: var(--tile-h); aspect-ratio: auto; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--ev-line), var(--ev-shade); }
.ev-ig--tile .ev-ig__frame { right: auto; bottom: auto; width: var(--ig-w); height: var(--ig-h, calc(var(--tile-h) / var(--s))); transform: scale(var(--s)); transform-origin: 0 0; border-radius: 0; }
.ev-ig--tile.is-cut::after { content: ""; position: absolute; inset: auto 0 0; z-index: 3; height: 3.4rem; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 88%); pointer-events: none; }
.ev-tile__art { position: absolute; inset: 0; display: block; background: radial-gradient(circle at 50% 46%, rgba(201, 164, 107, .24) 0 2.6rem, transparent 2.7rem), linear-gradient(180deg, #fff, #f7f1e4); }
.ev-tile__art::before {                                         /* the kind of post, with a short gold bar before it */
  content: attr(data-label); position: absolute; left: 1rem; top: 1rem; padding-left: .55rem; border-left: 3px solid var(--ev-gold); color: var(--ev-ink);
  font: 700 .72rem/1 var(--body-font, Lato, sans-serif); letter-spacing: .18em; text-transform: uppercase;
}
.ev-tile__art::after { content: none; }                         /* (this pseudo is also .ev-ig__art::after of event-watch.css, a dark gradient meant for the featured player's poster) */
.ev-ig--tile .ev-ig__disc { top: 46%; width: 3.6rem; height: 3.6rem; font-size: 1.05rem; box-shadow: 0 10px 22px -10px rgba(10, 35, 66, .6), 0 0 0 6px rgba(201, 164, 107, .28); }
.ev-ig--tile .ev-ig__note { bottom: .95rem; border: 1px solid var(--ev-line); background: #fff; color: var(--ev-muted); font-size: .7rem; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ev-ig--tile .ev-ig__start:focus-visible { outline-color: var(--ev-ink); }

.ev-posts__meta { display: grid; gap: .05rem; padding-inline: .15rem; }
.ev-posts__cap { margin: 0; color: var(--ev-ink); font: 700 1rem/1.3 var(--heading-font, Georgia, serif); overflow-wrap: anywhere; }
.ev-posts__open { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; color: var(--ev-ink-2); font-size: .86rem; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--ev-gold); text-decoration-thickness: 2px; }
.ev-posts__open:hover { color: var(--ev-ink); }
.ev-posts__open i { font-size: .7rem; }

/* ---------- Links to other sites ---------- */
.ev-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: .85rem; margin: 0; padding: 0; list-style: none; }
.ev-link {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .85rem; align-items: center; min-height: 4.4rem; padding: .8rem 1rem; overflow: hidden;
  border: 1px solid var(--ev-line); border-radius: 16px; background: var(--ev-card); color: var(--ev-ink); text-decoration: none;
  transition: border-color .2s, transform .3s var(--ev-ease), box-shadow .3s;
}
.ev-link::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--ev-gold); transition: width .25s var(--ev-ease); }
.ev-link:hover { border-color: var(--ev-ink); transform: translateY(-2px); box-shadow: var(--ev-shade); }
.ev-link:hover::before { width: 7px; }
.ev-link__icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--ev-ink); color: #fff; font-size: 1.1rem; }
.ev-link--unstop .ev-link__icon { background: #1c4ed8; }
.ev-link--linkedin .ev-link__icon { background: #0a66c2; }
.ev-link--youtube .ev-link__icon { background: #cc0000; }
.ev-link--whatsapp .ev-link__icon { background: #128c4a; }
.ev-link--instagram .ev-link__icon { background: linear-gradient(45deg, #f09433, #dc2743 55%, #8a3ab9); }
.ev-link--website .ev-link__icon { background: var(--ev-gold); color: var(--ev-ink); }
.ev-link__text { display: grid; gap: .15rem; min-width: 0; }
.ev-link__label { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.ev-link__host { color: var(--ev-muted); font-size: .8rem; overflow-wrap: anywhere; }
.ev-link__go { color: var(--ev-gold-deep); font-size: .8rem; transition: transform .25s var(--ev-ease); }
.ev-link:hover .ev-link__go { transform: translate(2px, -2px); }

/* ---------- Documents ---------- */
.ev-docs__list { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.ev-doc {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem 1.2rem; align-items: center; padding: 1.1rem 1.3rem;
  border: 1px solid var(--ev-line); border-radius: 18px; background: var(--ev-card); box-shadow: var(--ev-shade);
}
.ev-doc__icon {
  display: grid; place-items: center; width: 3.4rem; height: 4.2rem; border-radius: 6px 14px 6px 6px; background: linear-gradient(160deg, #123a6b, var(--ev-ink)); color: var(--ev-gold); font-size: 1.35rem;
  box-shadow: 4px 5px 0 -1px rgba(201, 164, 107, .55);                                    /* a book with its page edge showing */
}
.ev-doc__body h3 { margin: 0 0 .2rem; color: var(--ev-ink); font-size: 1.2rem; line-height: 1.25; overflow-wrap: anywhere; }
.ev-doc__body p { margin: 0; color: var(--ev-muted); font-size: .92rem; }
.ev-doc__actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.ev-doc__actions .ev-btn { min-height: 46px; }

@media (max-width: 560px) { .ev-posts__more { display: none; } }
@media (max-width: 640px) {
  .ev-doc { grid-template-columns: auto minmax(0, 1fr); padding: 1rem; }
  .ev-doc__actions { grid-column: 1 / -1; justify-content: stretch; }
  .ev-doc__actions .ev-btn { flex: 1 1 8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ev-link, .ev-link::before, .ev-link__go, .ev-vhero__doc, .ev-posts__btn, .ev-posts__allow { transition: none; }
  .ev-posts__rail { scroll-behavior: auto; }
  .ev-link:hover, .ev-vhero__doc:hover { transform: none; }
}
