/**
 * heimspiel.io — Fan Shop Styles
 * Event listing, ticket selection, checkout, success
 */

/* ===== LAYOUT ===== */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--hs-bg);
  position: relative;
}

.screen {
  display: none;
  min-height: 100vh;
  flex-direction: column;
}

.screen.active {
  display: flex;
  animation: screenIn 0.3s ease;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: none; }
}

/* ===== LOADING / ERROR ===== */
.loading-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--hs-border);
  border-top-color: var(--hs-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== CLUB HERO ===== */
.club-hero {
  background: var(--hs-secondary);
  padding: 32px 24px 36px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.club-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.club-hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: rgba(230, 57, 70, 0.12);
  border-radius: 50%;
}

.club-avatar {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--hs-primary);
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 8px;
}

.club-name {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.club-sport {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

.club-loc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

/* ===== EVENT LIST ===== */
.ev-list {
  padding: 20px;
  flex: 1;
}

.ev-list-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--hs-text-mid);
  margin-bottom: 12px;
}

.ev-item {
  background: #fff;
  border: 1.5px solid var(--hs-border);
  border-radius: var(--hs-radius-sm);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.ev-item:hover {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: var(--hs-shadow-md);
  transform: translateY(-2px);
}

.ev-item:active {
  transform: scale(0.98);
}

.ev-item-stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.ev-item-date {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ev-item-day {
  border-radius: 8px;
  padding: 6px 10px;
  text-align: center;
  min-width: 48px;
}

.ev-item-day .d {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.ev-item-day .m {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.ev-item-info h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.ev-item-info p {
  font-size: 12px;
  color: var(--hs-text-light);
  margin-top: 2px;
}

.ev-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hs-border);
}

.ev-item-price {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--hs-primary);
}

.ev-item-price small {
  font-weight: 500;
  color: var(--hs-text-light);
  font-size: 11px;
}

.ev-item-avail {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ev-item-avail::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.ev-item-avail.ok { color: var(--hs-success); }
.ev-item-avail.ok::before { background: var(--hs-success); }
.ev-item-avail.low { color: var(--hs-warning); }
.ev-item-avail.low::before { background: var(--hs-warning); }
.ev-item-avail.out { color: var(--hs-danger); }
.ev-item-avail.out::before { background: var(--hs-danger); }

.ev-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.ev-badge.hot { background: var(--hs-primary-bg); color: var(--hs-primary); }
.ev-badge.soon { background: var(--hs-accent-bg); color: #B45309; }
.ev-badge.soldout { background: #F1F5F9; color: var(--hs-text-light); }

.ev-item.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.powered {
  text-align: center;
  padding: 16px;
  font-size: 11px;
  color: var(--hs-text-light);
}
.powered em {
  color: var(--hs-primary);
  font-style: normal;
}

/* Footer payment logos & legal */
.payment-logos {
  text-align: center;
  padding: 16px 20px 4px;
  border-top: 1px solid var(--hs-border);
  margin-top: 8px;
}
.payment-logos-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--hs-text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.payment-logos-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.legal-links {
  text-align: center;
  padding: 12px 16px 0;
  font-size: 11px;
}
.legal-links a {
  color: var(--hs-text-light);
  margin: 0 8px;
  text-decoration: none;
}
.legal-links a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.hdr {
  background: var(--hs-secondary);
  padding: 0 24px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hdr::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(230, 57, 70, 0.12);
  border-radius: 50%;
}

.hdr-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 14px 0 8px;
}

.hdr-back:hover { color: #fff; }

.hdr-org {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 4px;
}

.hdr-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.hdr-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* ===== BODY ===== */
.body {
  flex: 1;
  padding: 20px;
}

/* ===== SECTION LABELS ===== */
.sec-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--hs-text-mid);
  margin-bottom: 12px;
}

/* ===== TICKET CATEGORY CARDS ===== */
.tkt {
  background: #fff;
  border: 2px solid var(--hs-border);
  border-radius: var(--hs-radius-sm);
  padding: 16px;
  margin-bottom: 10px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.tkt:hover { border-color: rgba(0, 0, 0, 0.12); box-shadow: var(--hs-shadow-sm); }
.tkt.sel { border-color: var(--hs-primary); background: var(--hs-primary-bg); }
.tkt.soldout { opacity: 0.5; }

.tkt-color {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
}

.tkt-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tkt-name {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.tkt-desc {
  font-size: 12px;
  color: var(--hs-text-light);
}

.tkt-price {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.tkt-price small {
  font-size: 12px;
  font-weight: 500;
  color: var(--hs-text-light);
  display: block;
}

.tkt-price.free { color: var(--hs-success); }

.tkt-qty {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 12px;
}

.qb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--hs-border);
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hs-text);
  transition: all 0.15s;
  user-select: none;
}

.qb:hover { background: var(--hs-bg); border-color: var(--hs-text-light); }
.qb:active { transform: scale(0.95); }
.qb.dis { opacity: 0.3; pointer-events: none; }

.qv {
  width: 48px;
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.tkt-avail {
  margin-left: auto;
  font-size: 11px;
  color: var(--hs-text-light);
}

/* ===== SUMMARY BAR ===== */
.sum-bar {
  background: #fff;
  border-top: 1px solid var(--hs-border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sum-count {
  font-size: 12px;
  color: var(--hs-text-light);
}

.sum-total {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.sum-total small {
  font-size: 12px;
  font-weight: 500;
  color: var(--hs-text-light);
}

.btn-go {
  background: var(--hs-primary);
  color: #fff;
  border: none;
  border-radius: var(--hs-radius-xs);
  padding: 14px 28px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-go:hover { background: var(--hs-primary-dark); }
.btn-go:active { transform: scale(0.97); }
.btn-go:disabled { opacity: 0.4; pointer-events: none; }

.btn-pay {
  width: 100%;
  justify-content: center;
  padding: 16px;
  font-size: 16px;
  margin-bottom: 8px;
}

/* ===== FORMS ===== */
.fg { margin-bottom: 14px; }
.fg label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--hs-text-mid);
  margin-bottom: 5px;
}

.fi {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--hs-border);
  border-radius: var(--hs-radius-xs);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  color: var(--hs-text);
  background: #fff;
  transition: all 0.15s;
}

.fi:focus {
  outline: none;
  border-color: var(--hs-border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.fi::placeholder { color: var(--hs-text-light); }

.form-section { margin-bottom: 20px; }
.form-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ===== ORDER SUMMARY ===== */
.order-sum {
  background: var(--hs-bg);
  border-radius: var(--hs-radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.ol {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.ol.tot {
  font-weight: 700;
  font-size: 15px;
  border-top: 2px solid var(--hs-border);
  margin-top: 6px;
  padding-top: 10px;
}

/* ===== INFO BOXES ===== */
.info-box {
  padding: 12px 16px;
  border-radius: var(--hs-radius-xs);
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.info-box.blue { background: #EFF6FF; color: #1D4ED8; }
.info-box.green { background: var(--hs-success-bg); color: #166D62; }

/* ===== STRIPE ELEMENT ===== */
#stripe-element {
  padding: 12px 14px;
  border: 1.5px solid var(--hs-border);
  border-radius: var(--hs-radius-xs);
  background: #fff;
  margin-bottom: 16px;
  min-height: 44px;
}

#stripe-element.StripeElement--focus {
  border-color: var(--hs-border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

#stripe-element.StripeElement--invalid {
  border-color: var(--hs-danger);
}

/* ===== SUCCESS ===== */
.suc-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--hs-success-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
}

/* ===== TICKET CARDS ===== */
.tc {
  background: #fff;
  border-radius: var(--hs-radius);
  overflow: hidden;
  box-shadow: var(--hs-shadow-md);
  margin: 0 20px 16px;
}

.tc-hdr {
  background: var(--hs-secondary);
  padding: 18px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.tc-hdr::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 80px;
  height: 80px;
  background: rgba(230, 57, 70, 0.15);
  border-radius: 50%;
}

.tc-org {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.tc-ev {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
}

.tc-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.tc-body {
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.tc-qr {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  background: #f0f0f0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--hs-text-light);
}

.tc-info { flex: 1; }

.tc-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.tc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--hs-text-light);
  margin-bottom: 4px;
}

.tc-price-display {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.tc-foot {
  padding: 12px 20px;
  background: var(--hs-bg);
  font-size: 11px;
  color: var(--hs-text-light);
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed var(--hs-border);
}

/* ===== QR SLIDER ===== */
.qr-slider { padding: 0; overflow: hidden; position: relative; margin: 0 20px 16px; }
.qr-track {
  display: flex;
  will-change: transform;
}
.qr-slide {
  flex-shrink: 0;
  box-sizing: border-box;
}
.qr-card {
  background: #fff;
  border-radius: var(--hs-radius);
  border: 1px solid var(--hs-border);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.qr-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.qr-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--hs-border);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.qr-dot.active {
  background: var(--hs-primary);
  transform: scale(1.3);
}

/* ===== TICKET ACTION BUTTONS ===== */
.tk-actions {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--hs-border);
}
.tk-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hs-text-light);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.tk-action-btn:not(:last-child) {
  border-right: 1px solid var(--hs-border);
}
.tk-action-btn:hover, .tk-action-btn:active {
  background: var(--hs-bg);
  color: var(--hs-text);
}
.tk-action-btn svg { flex-shrink: 0; }
.tk-wallet-btn { color: #1D3557; }
.tk-wallet-btn:hover { background: rgba(29,53,87,0.05); }

/* ===== SHARE / BACK BUTTONS ===== */
.btn-share {
  background: var(--hs-secondary);
  color: #fff;
  border: none;
  border-radius: var(--hs-radius-xs);
  padding: 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-share:hover { background: var(--hs-secondary-light); }

/* ===== EMPTY STATE ===== */
.ev-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--hs-text-light);
}

.ev-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 481px) {
  #app {
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: var(--hs-radius);
    overflow: hidden;
    box-shadow: var(--hs-shadow-lg);
    min-height: calc(100vh - 40px);
  }
}
