/* Site-wide announcement modal — temporary until 31 May 2026
   Center-screen, dismissable. Per session: shown once, then hidden via sessionStorage. */

#gym-announce-overlay {
  position: fixed; inset: 0; z-index: 9995;
  background: rgba(15, 30, 50, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: gym-announce-fade-in 0.25s ease-out forwards;
}

@keyframes gym-announce-fade-in {
  to { opacity: 1; }
}

#gym-announce-modal {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  transform: translateY(20px) scale(0.96);
  animation: gym-announce-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}

@keyframes gym-announce-slide-in {
  to { transform: translateY(0) scale(1); }
}

#gym-announce-modal header {
  background: linear-gradient(135deg, #1e73be 0%, #2587d8 100%);
  color: #fff;
  padding: 20px 24px;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

#gym-announce-modal header svg.gym-announce-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  fill: #fff;
}

#gym-announce-modal header h2 {
  margin: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

#gym-announce-close {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 0;
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#gym-announce-close:hover,
#gym-announce-close:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

#gym-announce-modal .gym-announce-body {
  padding: 24px 28px 20px;
  color: #2c3e50;
  font-size: 16px;
  line-height: 1.6;
}

#gym-announce-modal .gym-announce-body p {
  margin: 0 0 14px;
}
#gym-announce-modal .gym-announce-body p:last-child {
  margin-bottom: 0;
}

.gym-announce-dates {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0f7fd;
  border-left: 3px solid #1e73be;
  padding: 10px 14px;
  border-radius: 4px;
  margin: 4px 0 14px;
  font-weight: 600;
  color: #1e73be;
}

.gym-announce-dates svg {
  width: 18px; height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

#gym-announce-modal footer {
  padding: 0 28px 24px;
  display: flex;
  justify-content: flex-end;
}

#gym-announce-ok {
  background: #1e73be;
  color: #fff;
  border: 0;
  padding: 10px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}
#gym-announce-ok:hover,
#gym-announce-ok:focus-visible {
  background: #155a96;
  outline: 2px solid #1e73be;
  outline-offset: 2px;
}

/* Mobile */
@media (max-width: 480px) {
  #gym-announce-modal { max-width: 100%; }
  #gym-announce-modal header { padding: 16px 18px; }
  #gym-announce-modal header h2 { font-size: 15px; }
  #gym-announce-modal .gym-announce-body { padding: 18px 20px 14px; font-size: 15px; }
  #gym-announce-modal footer { padding: 0 20px 18px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #gym-announce-overlay,
  #gym-announce-modal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Hide when user has reading mask / pause animations active — defer to a11y preferences */
html.a11y-pause-animations #gym-announce-overlay,
html.a11y-pause-animations #gym-announce-modal {
  animation: none;
  opacity: 1;
  transform: none;
}
