/* YCR island-theme banner styles. Keeps the site's dark base; banner sits above nav. */
.ycr-island-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--red) 50%, var(--green) 100%);
  background-size: 200% 100%;
  animation: ycr-island-shimmer 18s linear infinite;
  color: #000;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 400;
  width: 100%;
}

.ycr-island-banner.ycr-island-leadup {
  background: linear-gradient(90deg, rgba(255, 184, 0, 0.18), rgba(0, 165, 80, 0.18));
  background-size: auto;
  animation: none;
  color: var(--gold);
  border-bottom: 1px solid rgba(255, 184, 0, 0.25);
}

.ycr-island-flags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ycr-island-flag {
  height: 22px;
  width: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  display: block;
}

.ycr-island-msg {
  flex: 1;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}

.ycr-island-banner.ycr-island-leadup .ycr-island-msg {
  text-shadow: none;
  text-transform: none;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}

.ycr-island-dismiss {
  background: rgba(0, 0, 0, 0.18);
  border: none;
  color: inherit;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
}

.ycr-island-dismiss:hover {
  background: rgba(0, 0, 0, 0.32);
}

@keyframes ycr-island-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@media (max-width: 640px) {
  .ycr-island-banner {
    padding: 7px 12px;
    font-size: 0.74rem;
    gap: 10px;
  }
  .ycr-island-flag { height: 18px; }
  .ycr-island-msg { text-align: left; }
}

/* ── Logo-strip treatment (homepage only): flags arranged in a circle AROUND the logo ── */
.logo-strip.ycr-island-themed {
  position: relative;
  padding-top: 95px;
  padding-bottom: 180px;
  overflow: visible;
}

/* Logo and greeting render ABOVE the flag layer */
.logo-strip.ycr-island-themed > img:not(.ycr-island-logo-flag) {
  position: relative;
  z-index: 2;
}

/* Flag-row is a 0x0 anchor at the logo's center; JS positions exactly on logo center */
.ycr-island-flag-row {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 1;
  pointer-events: none;
}

/* The flag-row itself rotates clockwise around the logo center. Each flag inside
   counter-rotates at the same speed to stay upright while orbiting. */
.logo-strip.ycr-island-themed .ycr-island-flag-row {
  animation: ycr-flag-orbit-cw 40s linear infinite;
}

/* Each flag is absolutely positioned at the anchor; JS sets --fx/--fy custom props
   for orbital position. max-width: none overrides the site's global `img { max-width: 100% }`
   rule which would otherwise clamp width to 0 (since the flag-row anchor is width: 0). */
.logo-strip img.ycr-island-logo-flag {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 50px;
  width: 75px;
  max-width: none;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
  display: block;
  animation:
    ycr-island-flag-fade 0.5s ease-out backwards,
    ycr-flag-orbit-ccw 40s linear infinite;
}

@keyframes ycr-flag-orbit-cw {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes ycr-flag-orbit-ccw {
  from { transform: translate(calc(-50% + var(--fx, 0px)), calc(-50% + var(--fy, 0px))) rotate(0deg); }
  to   { transform: translate(calc(-50% + var(--fx, 0px)), calc(-50% + var(--fy, 0px))) rotate(-360deg); }
}

/* Stagger the entrance fade so the ring assembles itself */
.ycr-island-flag-row > .ycr-island-logo-flag:nth-child(2) { animation-delay: 0.07s; }
.ycr-island-flag-row > .ycr-island-logo-flag:nth-child(3) { animation-delay: 0.14s; }
.ycr-island-flag-row > .ycr-island-logo-flag:nth-child(4) { animation-delay: 0.21s; }
.ycr-island-flag-row > .ycr-island-logo-flag:nth-child(5) { animation-delay: 0.28s; }
.ycr-island-flag-row > .ycr-island-logo-flag:nth-child(n+6) { animation-delay: 0.35s; }

@keyframes ycr-island-flag-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ycr-island-logo-greeting {
  position: relative;
  z-index: 2;
  margin: 150px auto 0;   /* clear the bottom of the orbit */
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--gold);
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.85), 0 2px 8px rgba(0, 0, 0, 0.95);
  max-width: 90%;
  line-height: 1.35;
  animation: ycr-island-greet-in 0.7s ease-out 0.4s backwards;
}

@keyframes ycr-island-greet-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .logo-strip.ycr-island-themed { padding-top: 70px; padding-bottom: 130px; }
  .logo-strip img.ycr-island-logo-flag { height: 34px; width: 51px; }
  .ycr-island-logo-greeting { font-size: 0.92rem; margin-top: 105px; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-strip.ycr-island-themed .ycr-island-flag-row { animation: none; }
  .logo-strip img.ycr-island-logo-flag {
    animation: ycr-island-flag-fade 0.5s ease-out backwards;
    transform: translate(calc(-50% + var(--fx, 0px)), calc(-50% + var(--fy, 0px)));
  }
  .ycr-decoration { animation-duration: 30s !important; }
}

/* ── Doodle-style decorations: floating themed emoji per holiday ── */
.ycr-decorations {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.ycr-decoration {
  position: absolute;
  top: -40px;
  display: inline-block;
  animation: ycr-decoration-fall linear infinite;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.6));
  user-select: none;
}

@keyframes ycr-decoration-fall {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate3d(20px, 460px, 0) rotate(360deg); opacity: 0; }
}
