/*
 * Bleep Page - Public notification page (QR code destination)
 * The page visitors see when scanning a pager's QR code
 */

/* Override container styles for bleep page */
body:has(.bleep-page) > main.container {
  max-width: 100%;
  padding: 0;
}

body:has(.bleep-page) > header.container,
body:has(.bleep-page) > footer.container {
  display: none;
}

/* --- Full Page Layout --- */

.bleep-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 176, 0, 0.08) 0%, transparent 50%),
    var(--pico-background-color);
}

.bleep-content {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--pico-spacing);
  padding-top: 5vh;
  text-align: center;
}

/* --- Ready State --- */

.bleep-ready {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bleep-context {
  font-size: 0.9rem;
  color: var(--pico-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin: calc(var(--pico-spacing) * 1.5) 0 0.5em 0;
  opacity: 0.9;
}

.bleep-heading {
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 0.25em 0;
  color: var(--pico-color);
  letter-spacing: -0.02em;
}

.bleep-description {
  font-size: 1rem;
  color: var(--pico-muted-color);
  margin: 0 0 calc(var(--pico-spacing) * 2) 0;
}

/* --- Notify Button --- */

.bleep-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  width: 100%;
  max-width: 400px;
  padding: 1.25em 3em;
  font-size: 1.25rem;
  font-weight: 600;
  border-radius: 100px;
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow:
    0 0 0 0 rgba(255, 176, 0, 0.4),
    0 4px 20px rgba(255, 176, 0, 0.3);
  -webkit-tap-highlight-color: transparent;
}

.bleep-button:hover {
  background: var(--pico-primary-hover);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 4px rgba(255, 176, 0, 0.15),
    0 8px 30px rgba(255, 176, 0, 0.4);
}

.bleep-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 0 0 0 rgba(255, 176, 0, 0.4),
    0 2px 10px rgba(255, 176, 0, 0.3);
}

.bleep-button-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bleep-button-icon svg {
  width: 24px;
  height: 24px;
}

/* Pulse animation on the button for attention */
.bleep-button {
  animation: buttonPulse 2s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes buttonPulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(255, 176, 0, 0.4),
      0 4px 20px rgba(255, 176, 0, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(255, 176, 0, 0),
      0 4px 20px rgba(255, 176, 0, 0.3);
  }
}

.bleep-button:hover {
  animation: none;
}

/* --- Success State --- */

.bleep-success {
  animation: fadeInUp 0.4s ease-out;
}

.success-visual {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto calc(var(--pico-spacing) * 1.5);
}

.success-check {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  display: grid;
  place-items: center;
  background: #22c55e;
  border-radius: 50%;
  color: white;
  animation: checkPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
}

.success-check svg {
  width: 32px;
  height: 32px;
  animation: checkDraw 0.3s ease-out 0.2s both;
}

@keyframes checkPop {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes checkDraw {
  from {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.success-ring {
  position: absolute;
  inset: 0;
  border: 2px solid #22c55e;
  border-radius: 50%;
  opacity: 0;
  animation: successPing 1.5s ease-out infinite;
}

.success-ring:nth-child(2) {
  animation-delay: 0.3s;
}

@keyframes successPing {
  0% {
    transform: scale(0.5);
    opacity: 0.6;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.bleep-title {
  font-size: clamp(2rem, 10vw, 3rem);
  font-weight: 700;
  margin: 0 0 0.25em 0;
  color: #22c55e;
  letter-spacing: -0.02em;
}

.bleep-subtitle {
  font-size: 1.1rem;
  color: var(--pico-muted-color);
  margin: 0;
}

/* --- Footer/Brand --- */

.bleep-footer {
  padding: calc(var(--pico-spacing) * 1.5) var(--pico-spacing);
  text-align: center;
}

.bleep-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.bleep-brand:hover {
  color: var(--pico-primary);
}

.brand-dot {
  width: 8px;
  height: 8px;
  background: var(--pico-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--pico-primary-focus);
}

.bleep-footer-separator {
  color: var(--pico-muted-color);
  margin-inline: 0.5em;
}

.bleep-footer a:not(.bleep-brand) {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
}
