/* New Year's Eve ribbon across the top of the page: frontend-parts/nye-ribbon.php
   (loaded only while the ribbon shows). The menu floats over the top picture, so it's moved down by
   the ribbon's height (--nye-ribbon-h) and the rest of the page moves down with the ribbon. */

:root {
  --nye-ribbon-h: 46px;
}
@media (max-width: 600px) {
  :root {
    --nye-ribbon-h: 44px;
  }
}

/* Move the floating menu below the ribbon (the admin bar adds its own height when you're logged in) */
body.has-nye-ribbon .site-header.header-full.floating-header {
  top: calc(12px + var(--nye-ribbon-h));
}
body.admin-bar.has-nye-ribbon .site-header.header-full.floating-header {
  top: calc(12px + 32px + var(--nye-ribbon-h));
}
@media (max-width: 782px) {
  body.admin-bar.has-nye-ribbon .site-header.header-full.floating-header {
    top: calc(12px + 46px + var(--nye-ribbon-h));
  }
}

.nye-ribbon,
.nye-ribbon:visited,
.nye-ribbon:hover,
.nye-ribbon:focus {
  position: relative;
  z-index: 2;
  display: flex;
  flex: none; /* the site lays out the page as a column; without this the ribbon gets squeezed to nothing */
  align-items: center;
  justify-content: center;
  height: var(--nye-ribbon-h);
  min-height: var(--nye-ribbon-h);
  padding: 0 16px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  background:
    radial-gradient(60% 220% at 50% 0%, rgba(217, 159, 43, 0.22) 0%, transparent 60%),
    linear-gradient(90deg, #0b2a22 0%, #0f2140 45%, #1b1747 100%);
  border-bottom: 1px solid rgba(242, 196, 109, 0.4);
}
.nye-ribbon:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px #f2c46d;
}
.nye-ribbon__defs {
  position: absolute;
  width: 0;
  height: 0;
}

/* Sparkles at the two ends, wide screens only */
.nye-ribbon__sky {
  position: absolute;
  top: 0;
  display: none;
  width: 220px;
  height: 46px;
  pointer-events: none;
}
.nye-ribbon__sky--left {
  left: 8px;
}
.nye-ribbon__sky--right {
  right: 8px;
}
@media (min-width: 1180px) {
  .nye-ribbon__sky {
    display: block;
  }
}
.nye-ribbon__star--gold {
  fill: #f2c46d;
}
.nye-ribbon__star--white {
  fill: rgba(255, 255, 255, 0.8);
}
.nye-ribbon__twinkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: nye-ribbon-twinkle 3s ease-in-out infinite;
}
@keyframes nye-ribbon-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Words and button */
.nye-ribbon__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.nye-ribbon__icon {
  flex: none;
  fill: #f2c46d;
}
.nye-ribbon__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.86);
}
.nye-ribbon__text strong {
  font-weight: 700;
  color: #fff;
}
.nye-r-sep {
  margin: 0 8px;
  color: #f2c46d;
}
.nye-r-show-sm {
  display: none;
}
.nye-ribbon__btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #231703;
  background: linear-gradient(180deg, #f7d27e 0%, #d99f2b 100%);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.nye-ribbon__btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}
.nye-ribbon:hover .nye-ribbon__btn {
  filter: brightness(1.06);
  box-shadow:
    0 0 0 3px rgba(242, 196, 109, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.nye-ribbon:hover .nye-ribbon__btn svg {
  transform: translateX(2px);
}
.nye-ribbon__preview {
  flex: none;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fbe6bb;
  border: 1px dashed rgba(242, 196, 109, 0.6);
  border-radius: 6px;
}

/* Tablets: drop the venue */
@media (max-width: 900px) {
  .nye-r-venue {
    display: none;
  }
}
/* Phones: "New Year's Eve · Dec 31" */
@media (max-width: 600px) {
  .nye-ribbon__inner {
    gap: 10px;
  }
  .nye-ribbon__text {
    font-size: 14px;
  }
  .nye-r-sep {
    margin: 0 6px;
  }
  .nye-r-hide-sm {
    display: none;
  }
  .nye-r-show-sm {
    display: inline;
  }
  .nye-ribbon__btn {
    padding: 0 12px;
    font-size: 13px;
  }
  .nye-ribbon--preview .nye-r-date,
  .nye-ribbon--preview .nye-ribbon__icon {
    display: none;
  }
  .nye-ribbon__preview {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nye-ribbon__twinkle {
    animation: none;
  }
  .nye-ribbon__btn,
  .nye-ribbon__btn svg {
    transition: none;
  }
}
