/* pay.css — Pay page component styles.
   Extracted from pay.html inline <style> block.
   Theme CSS variables (--sp-panel, --sp-border-subtle, etc.) are set by
   the school theme files; defaults below are the unthemed fallbacks.
*/

:root {
  --sp-bg: #020617;
  --sp-panel: rgba(5, 12, 20, 0.82);
  --sp-panel-soft: rgba(5, 12, 20, 0.72);
  --sp-border-subtle: rgba(148, 163, 184, 0.35);
  --sp-text-main: #e5f0ff;
  --sp-text-muted: #94a3b8;
  --sp-accent: #22c55e;
  --sp-accent-soft: rgba(34, 197, 94, 0.12);
}

body[data-page="pay"] {
  margin: 0;
  min-height: 100vh;
  color: var(--sp-text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.75rem;
  position: relative;
  z-index: 10;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #ecfdf5;
  background: radial-gradient(circle at 30% 30%, #4ade80, #16a34a);
  box-shadow: 0 0 30px rgba(22, 163, 74, 0.45);
}

.brand-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  box-shadow: 0 0 30px rgba(22, 163, 74, 0.45);
}

.brand-text-primary {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.brand-text-secondary {
  font-size: 0.85rem;
  color: var(--sp-text-muted);
}

.page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem 2rem;
}

.content-max {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.pay-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.25fr);
  gap: 1.75rem;
  align-items: flex-start;
}

/* Glass cards over mascot background */
.card-shell {
  position: relative;
  background: var(--sp-panel);
  border-radius: 1.25rem;
  border: 1px solid var(--sp-border-subtle);
  padding: 1.75rem;
  box-shadow:
    0 40px 80px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  overflow: hidden;
}

.card-shell--howitworks {
  background: var(--sp-panel-soft);
}

.card-header {
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.card-subtitle {
  font-size: 0.95rem;
  color: var(--sp-text-muted);
  margin-top: 0.35rem;
}

.field-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sp-text-muted);
  margin-bottom: 0.45rem;
}

.ticket-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.15rem;
}

.ticket-input-row input[type="text"],
.ticket-input-row input[type="number"] {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.94);
  color: var(--sp-text-main);
  padding: 0.7rem 1.1rem;
  outline: none;
  font-size: 0.95rem;
}

.ticket-input-row input::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

.btn-primary {
  border-radius: 999px;
  border: none;
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.5);
  transition: transform 0.06s ease-out, box-shadow 0.08s ease-out,
    filter 0.08s ease-out;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(16, 185, 129, 0.65);
  filter: brightness(1.03);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

.badge-secure {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--sp-text-muted);
  margin-top: 0.85rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.40);
  position: relative;
  animation: badgeDotGlow 2s ease-in-out infinite;
}

.badge-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.50);
  opacity: 0.16;
  filter: blur(2px);
  transform: scale(0.55);
  animation: badgeDotPing 1.6s ease-out infinite;
}

@keyframes badgeDotGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(34, 197, 94, 0.40); }
  50% { box-shadow: 0 0 22px rgba(34, 197, 94, 0.75); }
}

@keyframes badgeDotPing {
  0% { transform: scale(0.55); opacity: 0.18; }
  65% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.9rem 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

.summary-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sp-text-muted);
  margin-bottom: 0.1rem;
}

.summary-value {
  font-weight: 500;
  color: var(--sp-text-main);
  word-break: break-word;
}

.summary-amount {
  font-size: 1.15rem;
  font-weight: 650;
}

.summary-section-title {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.pay-card-footer {
  margin-top: 1.75rem;
  display: flex;
  justify-content: flex-start;
}

.pay-card-footer .btn-primary {
  min-width: 160px;
}

.howitworks-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.howitworks-list {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
  color: var(--sp-text-muted);
  font-size: 0.9rem;
}

.howitworks-list li {
  margin: 0.2rem 0;
}

.page-footer {
  padding: 1rem 1.75rem 1.5rem;
  font-size: 0.8rem;
  color: var(--sp-text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.page-footer span {
  opacity: 0.9;
}

.page-footer a {
  color: var(--sp-text-muted);
  text-decoration: none;
}

.page-footer a:hover {
  text-decoration: underline;
}

/* Error banner */
#error-banner {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #fca5a5;
  display: none;
}

#error-banner.show {
  display: block;
}

/* Ticket photo in summary card */
.pay-ticket-photo-container {
  margin-top: 1.25rem;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.pay-ticket-photo {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

/* ── Frosted pay variant overrides ─────────────────────────────── */

body.frosted-pay {
  --sp-panel: rgba(5, 12, 20, 0.90);
  --sp-panel-soft: rgba(5, 12, 20, 0.82);
  background: radial-gradient(circle at top, #020617 0, #020617 45%, #000 100%);
}

body.frosted-pay .page-main {
  padding-top: 0;
}

body.frosted-pay .card-shell {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 900px) {
  .pay-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .brand-bar {
    padding-inline: 1.1rem;
  }
  .page-main {
    padding-inline: 1rem;
  }
  .card-shell {
    padding-inline: 1.25rem;
  }
}
