/* ── Paddle Battles Registration — Public CSS ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

#pb-registration-app {
  --pb-navy:   #0a2540;
  --pb-navy2:  #1a3a5c;
  --pb-blue:   #1a6eb5;
  --pb-light:  #d4e8f7;
  --pb-light2: #e8f3fb;
  --pb-light3: #f2f8fd;
  --pb-text:   #1a2940;
  --pb-muted:  #64748b;
  --pb-border: #c8dde9;
  --pb-white:  #ffffff;
  --pb-red:    #dc2626;
  --pb-green:  #16a34a;
  --pb-r:      10px;
  font-family: 'Inter', sans-serif;
  color: var(--pb-text);
}

#pb-registration-app * { box-sizing: border-box; }

/* ── Hero ──────────────────────────────────── */
.pb-hero { background: linear-gradient(160deg, var(--pb-navy) 0%, var(--pb-navy2) 100%); padding: 52px 24px 36px; text-align: center; }
.pb-hero-tag { display: inline-block; background: rgba(255,255,255,.12); color: #7eb8f7; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; padding: 5px 14px; border-radius: 20px; margin-bottom: 16px; }
.pb-hero-title { color: #fff; font-size: clamp(28px,6vw,50px); font-weight: 800; line-height: 1.1; margin: 0 0 10px; }
.pb-hero-title span { color: #7eb8f7; }
.pb-hero-sub { color: rgba(255,255,255,.6); font-size: 16px; max-width: 420px; margin: 0 auto; line-height: 1.6; }

/* ── Events list ───────────────────────────── */
.pb-events-list { max-width: 660px; margin: 28px auto 0; display: flex; flex-direction: column; gap: 10px; }
.pb-event-row { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pb-event-row-info h3 { color: #fff; font-size: 16px; font-weight: 700; margin: 0 0 2px; }
.pb-event-row-info p { color: rgba(255,255,255,.5); font-size: 13px; margin: 0; }
.pb-btn-enter { background: #7eb8f7; color: var(--pb-navy); font-size: 14px; font-weight: 800; padding: 9px 22px; border-radius: 50px; border: none; cursor: pointer; white-space: nowrap; transition: all .2s; font-family: inherit; }
.pb-btn-enter:hover { background: #a8d0f9; transform: translateY(-1px); }
.pb-btn-enter.active { background: rgba(255,255,255,.15); color: #fff; }

/* ── Divisions dropdown ────────────────────── */
.pb-divisions-dropdown { max-width: 660px; margin: 0 auto; overflow: hidden; max-height: 0; transition: max-height .45s ease; }
.pb-divisions-dropdown.open { max-height: 900px; }
.pb-divisions-card { background: var(--pb-white); border-radius: 0 0 16px 16px; box-shadow: 0 12px 40px rgba(10,37,64,.18); padding: 26px 22px 22px; }
.pb-divisions-title { text-align: center; font-size: 18px; font-weight: 800; color: var(--pb-navy); margin-bottom: 2px; }
.pb-divisions-sub { text-align: center; color: var(--pb-muted); font-size: 13px; margin-bottom: 18px; }
.pb-divisions-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 18px; }
@media (max-width: 540px) { .pb-divisions-grid { grid-template-columns: repeat(2,1fr); } }

.pb-division-cell { border: 2px solid var(--pb-border); border-radius: var(--pb-r); overflow: hidden; transition: border-color .2s; }
.pb-division-cell.active { border-color: var(--pb-blue); }
.pb-division-cell.sold-out .pb-division-name { background: #f1f5f9; color: #94a3b8; }
.pb-division-name { background: var(--pb-light2); text-align: center; font-weight: 800; font-size: 14px; color: var(--pb-navy); padding: 11px 6px; border-bottom: 1px solid var(--pb-border); }
.pb-division-cell.active .pb-division-name { background: var(--pb-light); color: var(--pb-blue); }

.pb-qty-row { display: flex; align-items: center; justify-content: center; padding: 8px; background: #fff; }
.pb-qty-btn { width: 28px; height: 28px; background: var(--pb-light2); border: 1px solid var(--pb-border); border-radius: 6px; font-size: 16px; font-weight: 700; color: var(--pb-navy); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; user-select: none; }
.pb-qty-btn:hover:not(:disabled) { background: var(--pb-blue); color: #fff; border-color: var(--pb-blue); }
.pb-qty-btn:disabled { opacity: .3; cursor: default; }
.pb-qty-num { width: 34px; text-align: center; font-size: 15px; font-weight: 700; color: var(--pb-navy); }
.pb-sold-out-label { font-size: 11px; color: #94a3b8; padding: 9px 6px; text-align: center; }

/* ── Totals ────────────────────────────────── */
.pb-totals-block { background: var(--pb-light3); border: 1px solid var(--pb-border); border-radius: var(--pb-r); padding: 14px 16px; margin-bottom: 14px; }
.pb-totals-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--pb-muted); padding: 3px 0; }
.pb-grand { border-top: 1px solid var(--pb-border); margin-top: 8px; padding-top: 10px; color: var(--pb-navy); font-weight: 800; font-size: 17px; }

.pb-btn-continue { display: block; width: 100%; background: var(--pb-navy); color: #fff; font-size: 15px; font-weight: 700; padding: 13px; border-radius: var(--pb-r); border: none; cursor: pointer; font-family: inherit; transition: all .2s; }
.pb-btn-continue:hover { background: var(--pb-navy2); }
.pb-btn-continue:disabled { opacity: .4; cursor: default; }

/* ── Container ─────────────────────────────── */
.pb-container { max-width: 660px; margin: 0 auto; padding: 32px 20px 70px; }
.pb-page-title { font-size: 24px; font-weight: 800; color: var(--pb-navy); margin-bottom: 3px; }
.pb-page-sub { color: var(--pb-muted); font-size: 14px; margin-bottom: 24px; }

/* ── Section cards ─────────────────────────── */
.pb-section-card { background: var(--pb-white); border-radius: 12px; box-shadow: 0 2px 12px rgba(10,37,64,.07); padding: 22px; margin-bottom: 14px; }
.pb-section-title { font-size: 15px; font-weight: 800; color: var(--pb-navy); margin-bottom: 16px; display: flex; align-items: center; gap: 9px; }
.pb-num { background: var(--pb-navy); color: #fff; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pb-section-note { font-weight: 400; font-size: 12px; color: var(--pb-muted); }

/* ── Forms ─────────────────────────────────── */
.pb-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .pb-form-grid-2 { grid-template-columns: 1fr; } }
.pb-span2 { grid-column: span 2; }
@media (max-width: 500px) { .pb-span2 { grid-column: span 1; } }

#pb-registration-app label { display: block; font-size: 12px; font-weight: 700; color: var(--pb-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.pb-req { color: var(--pb-red); margin-left: 2px; }
#pb-registration-app input[type="text"],
#pb-registration-app input[type="email"],
#pb-registration-app input[type="tel"],
#pb-registration-app input[type="number"],
#pb-registration-app select {
  width: 100%; padding: 11px 13px; background: var(--pb-light3); border: 1.5px solid var(--pb-border); border-radius: 8px; color: var(--pb-text); font-size: 14px; font-family: 'Inter', sans-serif; transition: border-color .2s, box-shadow .2s;
}
#pb-registration-app input:focus, #pb-registration-app select:focus { outline: none; border-color: var(--pb-blue); box-shadow: 0 0 0 3px rgba(26,110,181,.1); }
#pb-registration-app input.pb-err-field { border-color: var(--pb-red); }

/* ── Player accordion ──────────────────────── */
.pb-player-block { background: var(--pb-white); border: 1.5px solid var(--pb-border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; transition: border-color .2s; }
.pb-player-block.open { border-color: var(--pb-blue); }
.pb-player-header { display: flex; align-items: center; justify-content: space-between; background: var(--pb-light2); padding: 13px 16px; cursor: pointer; user-select: none; }
.pb-player-block.open .pb-player-header { background: var(--pb-light); }
.pb-player-header-left { font-weight: 800; font-size: 14px; color: var(--pb-navy); display: flex; align-items: center; gap: 8px; }
.pb-entry-badge { background: var(--pb-blue); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.pb-chevron { font-size: 16px; color: var(--pb-navy); transition: transform .25s; }
.pb-player-block.open .pb-chevron { transform: rotate(180deg); }
.pb-player-body { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; padding: 0 16px; }
.pb-player-block.open .pb-player-body { max-height: 600px; padding: 16px; }

/* ── Terms ─────────────────────────────────── */
.pb-terms-wrap { display: flex; align-items: flex-start; gap: 12px; background: var(--pb-light3); border: 1px solid var(--pb-border); border-radius: var(--pb-r); padding: 13px 15px; margin-bottom: 14px; cursor: pointer; }
.pb-terms-wrap input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; accent-color: var(--pb-navy); cursor: pointer; margin-top: 1px; }
.pb-terms-text { font-size: 13px; color: var(--pb-muted); line-height: 1.6; text-transform: none; letter-spacing: 0; font-weight: 400; }
.pb-terms-text a { color: var(--pb-blue); }

/* ── Order summary ─────────────────────────── */
.pb-order-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--pb-muted); padding: 3px 0; }
.pb-order-row.total { border-top: 1px solid var(--pb-border); margin-top: 8px; padding-top: 10px; color: var(--pb-navy); font-weight: 800; font-size: 17px; }

/* ── Stripe element ────────────────────────── */
#pb-stripe-element { background: var(--pb-white); border: 1.5px solid var(--pb-border); border-radius: var(--pb-r); padding: 16px; min-height: 60px; margin-bottom: 14px; }

/* ── Buttons ───────────────────────────────── */
.pb-btn-primary { display: block; width: 100%; background: var(--pb-navy); color: #fff; font-size: 15px; font-weight: 700; padding: 14px; border-radius: var(--pb-r); border: none; cursor: pointer; font-family: inherit; transition: all .2s; }
.pb-btn-primary:hover { background: var(--pb-navy2); transform: translateY(-1px); }
.pb-btn-primary:disabled { opacity: .45; cursor: default; transform: none; }
.pb-btn-pay { background: var(--pb-green) !important; }
.pb-btn-pay:hover { background: #15803d !important; }
.pb-btn-back { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--pb-muted); font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 20px; font-family: inherit; padding: 0; }
.pb-btn-back:hover { color: var(--pb-navy); }

/* ── Errors / loading ──────────────────────── */
.pb-err-msg { background: #fef2f2; border: 1px solid #fca5a5; color: var(--pb-red); border-radius: 8px; padding: 10px 13px; font-size: 13px; margin-top: 10px; display: none; }
.pb-err-msg.show { display: block; }
.pb-loading { color: rgba(255,255,255,.4); text-align: center; padding: 20px; }
.pb-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: pb-spin .6s linear infinite; vertical-align: middle; margin-right: 5px; }
@keyframes pb-spin { to { transform: rotate(360deg); } }

/* ── Success ───────────────────────────────── */
.pb-success-box { background: var(--pb-white); border-radius: 16px; box-shadow: 0 4px 24px rgba(10,37,64,.1); padding: 56px 36px; text-align: center; max-width: 500px; margin: 50px auto; }
.pb-success-icon { font-size: 60px; margin-bottom: 18px; }
.pb-success-box h2 { font-size: 26px; font-weight: 800; color: var(--pb-navy); margin: 0 0 10px; }
.pb-success-box p { color: var(--pb-muted); font-size: 15px; line-height: 1.7; margin: 0; }

@media (max-width: 480px) {
  .pb-hero { padding: 40px 16px 28px; }
  .pb-divisions-card { padding: 18px 12px; }
  .pb-section-card { padding: 16px 12px; }
  .pb-event-row { flex-direction: column; align-items: flex-start; }
}

/* ── Button-only mode ──────────────────────── */
.pb-button-mode .pb-divisions-dropdown { border-radius: var(--pb-r); }
.pb-button-mode .pb-divisions-card { border-radius: var(--pb-r); }


.pb-btn-enter-main {
  background: var(--pb-navy);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  display: inline-block;
}
.pb-btn-enter-main:hover { background: var(--pb-navy2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(10,37,64,.2); }
.pb-btn-enter-main.active { background: var(--pb-blue); }

/* ── Hidden state (no scroll jump) ──────────── */
/* Used by JS pbShow/pbHide instead of display:none */
#pb-registration-app .pb-hidden {
  display: none !important;
}

/* ── Button mode centering ───────────────────── */
.pb-btn-mode-wrap {
  text-align: center;
  padding: 8px 0;
}

/* ── Registration Closed (expired event) ──── */
.pb-reg-closed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 50px;
  border: 1.5px solid #e2e8f0;
  letter-spacing: .02em;
  white-space: nowrap;
}
.pb-reg-closed::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

/* Expired state for button-mode main button */
.pb-btn-enter-main.pb-btn-expired,
.pb-btn-enter-main:disabled {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}