/* =========================================================
   Fan Tickets – Front-end styles
   Design: Deep navy field + electric green accent
   ========================================================= */

:root {
  --ft-navy:       #0C2340;
  --ft-navy-mid:   #132E52;
  --ft-navy-light: #1C3D6A;
  --ft-green:      #00D166;
  --ft-green-dim:  #00A84F;
  --ft-white:      #FFFFFF;
  --ft-off-white:  #EDF2F7;
  --ft-muted:      #8DA3BA;
  --ft-border:     rgba(255,255,255,0.08);
  --ft-red:        #FF4057;
  --ft-amber:      #FFB020;
  --ft-radius:     12px;
  --ft-radius-sm:  8px;
  --ft-shadow:     0 4px 24px rgba(0,0,0,0.35);
  --ft-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Portal ── */
.ft-portal {
  font-family: var(--ft-font);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.ft-portal-header {
  text-align: center;
  padding: 48px 16px 40px;
}
.ft-portal-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ft-green);
  background: rgba(0,209,102,.12);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 14px;
}
.ft-portal-title {
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 800;
  color: var(--ft-navy);
  margin: 0 0 10px;
  line-height: 1.1;
}
.ft-portal-sub {
  font-size: 15px;
  color: #607080;
  margin: 0;
}

/* ── Fixtures grid ── */
.ft-fixtures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ── Fixture card ── */
.ft-fixture-card {
  background: var(--ft-navy);
  border-radius: var(--ft-radius);
  padding: 24px;
  box-shadow: var(--ft-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.ft-fixture-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ft-green), #00A8FF);
}
.ft-fixture-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 36px rgba(0,0,0,.45);
}
.ft-fixture-card.ft-sold-out {
  opacity: .65;
}

.ft-fixture-competition {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ft-green);
  background: rgba(0,209,102,.12);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  align-self: flex-start;
}

.ft-fixture-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ft-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.ft-badge { font-size: 28px; line-height: 1; }
.ft-team-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ft-white);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ft-vs-block { flex: 0 0 40px; text-align: center; }
.ft-vs {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--ft-muted);
}

.ft-fixture-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ft-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ft-muted);
}
.ft-meta-item svg { width: 12px; height: 12px; flex-shrink: 0; }

.ft-fixture-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--ft-border);
}
.ft-ticket-info { display: flex; flex-direction: column; gap: 4px; }
.ft-price-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ft-muted); }
.ft-price-amount { font-size: 20px; font-weight: 800; color: var(--ft-white); }

.ft-urgency {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ft-amber);
  font-weight: 600;
}
.ft-urgency-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ft-amber);
  animation: ft-pulse 1.4s ease-in-out infinite;
}
@keyframes ft-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}

.ft-sold-out-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--ft-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── Buy button ── */
.ft-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ft-green);
  color: var(--ft-navy);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: var(--ft-radius-sm);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.ft-buy-btn svg { width: 14px; height: 14px; }
.ft-buy-btn:hover  { background: #00E870; transform: scale(1.03); }
.ft-buy-btn:active { transform: scale(.98); }

/* ── Empty state ── */
.ft-empty {
  text-align: center;
  padding: 60px 24px;
  color: #607080;
}
.ft-empty-icon { font-size: 48px; margin-bottom: 16px; }
.ft-empty h3 { font-size: 20px; color: var(--ft-navy); margin: 0 0 8px; }

/* ── Modal overlay ── */
.ft-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 15, 35, .75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ft-modal-overlay[hidden] { display: none; }

.ft-modal {
  background: var(--ft-white);
  border-radius: var(--ft-radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: ft-slide-up .22s ease;
}
@keyframes ft-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ft-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(0,0,0,.07);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #444;
  z-index: 1;
  transition: background .15s;
}
.ft-modal-close:hover { background: rgba(0,0,0,.14); }

.ft-modal-body { padding: 28px; }

/* ── Single match widget ── */
.ft-single-match {
  font-family: var(--ft-font);
  border-radius: var(--ft-radius);
  overflow: hidden;
  box-shadow: var(--ft-shadow);
  max-width: 680px;
  margin: 0 auto;
}

.ft-match-hero {
  background: linear-gradient(135deg, var(--ft-navy) 0%, var(--ft-navy-light) 100%);
  padding: 28px 24px 24px;
  text-align: center;
}
.ft-competition-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ft-green);
  background: rgba(0,209,102,.15);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 20px;
}
.ft-teams-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}
.ft-team-block { flex: 1; text-align: center; }
.ft-team-badge-lg { font-size: 40px; margin-bottom: 8px; }
.ft-team-name-lg {
  font-size: 14px;
  font-weight: 800;
  color: var(--ft-white);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ft-vs-center { flex: 0 0 48px; }
.ft-vs-lg {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--ft-muted);
}
.ft-match-info-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ft-muted);
}
.ft-match-info-bar span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Zones ── */
.ft-zones-section {
  background: #F7F9FC;
  padding: 24px;
}
.ft-zones-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #607080;
  margin: 0 0 16px;
}
.ft-zones-list { display: flex; flex-direction: column; gap: 10px; }

.ft-zone-row {
  background: var(--ft-white);
  border: 2px solid transparent;
  border-radius: var(--ft-radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.ft-zone-row:not(.ft-zone-soldout):hover,
.ft-zone-row.ft-zone-selected {
  border-color: var(--ft-green);
  box-shadow: 0 0 0 3px rgba(0,209,102,.15);
}
.ft-zone-soldout { opacity: .55; cursor: default; }

.ft-zone-info { flex: 1; }
.ft-zone-name { font-size: 14px; font-weight: 600; color: var(--ft-navy); margin-bottom: 4px; }
.ft-zone-avail { }

.ft-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ft-tag-avail   { background: rgba(0,209,102,.12); color: var(--ft-green-dim); }
.ft-tag-low     { background: rgba(255,176,32,.15); color: #B07800; }
.ft-tag-soldout { background: rgba(0,0,0,.07);      color: #999; }

.ft-zone-price { font-size: 15px; font-weight: 800; color: var(--ft-navy); }

.ft-select-zone-btn {
  background: var(--ft-navy);
  color: var(--ft-white);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: background .15s;
  flex-shrink: 0;
}
.ft-select-zone-btn:hover { background: var(--ft-navy-light); }
.ft-zone-row.ft-zone-selected .ft-select-zone-btn {
  background: var(--ft-green);
  color: var(--ft-navy);
}

/* ── Checkout panel ── */
.ft-checkout-panel {
  background: var(--ft-white);
  padding: 24px;
  border-top: 1px solid #E8EDF3;
}
.ft-checkout-panel[hidden] { display: none; }

.ft-checkout-summary {
  background: #F0F7FF;
  border-radius: var(--ft-radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ft-navy);
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.ft-qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.ft-qty-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ft-navy);
  min-width: 60px;
}
.ft-qty-control {
  display: flex;
  align-items: center;
  border: 2px solid #D0DBE8;
  border-radius: var(--ft-radius-sm);
  overflow: hidden;
}
.ft-qty-btn {
  background: #F0F4F8;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  color: var(--ft-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}
.ft-qty-btn:hover { background: #DDE6EF; }
.ft-qty-input {
  width: 48px;
  border: none;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--ft-navy);
  background: #fff;
  outline: none;
}
.ft-total-price {
  margin-left: auto;
  font-size: 20px;
  font-weight: 800;
  color: var(--ft-navy);
}

.ft-buyer-fields h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #607080;
  margin: 0 0 14px;
}
.ft-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ft-fields-grid .ft-field:last-child {
  grid-column: 1 / -1;
}
.ft-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #607080;
  margin-bottom: 5px;
}
.ft-req { color: var(--ft-red); }
.ft-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #D0DBE8;
  border-radius: var(--ft-radius-sm);
  font-size: 14px;
  color: var(--ft-navy);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.ft-input:focus {
  outline: none;
  border-color: var(--ft-green);
  box-shadow: 0 0 0 3px rgba(0,209,102,.15);
}

.ft-field-error {
  background: rgba(255,64,87,.1);
  color: var(--ft-red);
  border-radius: var(--ft-radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 0;
}
.ft-field-error[hidden] { display: none; }

.ft-confirm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
  background: var(--ft-green);
  color: var(--ft-navy);
  font-size: 15px;
  font-weight: 800;
  padding: 15px 24px;
  border-radius: var(--ft-radius-sm);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .07em;
  transition: background .15s, transform .1s;
}
.ft-confirm-btn:hover  { background: #00E870; transform: translateY(-1px); }
.ft-confirm-btn:active { transform: scale(.98); }
.ft-confirm-btn:disabled { background: #C5D5E8; color: #888; cursor: default; transform: none; }

/* ── Success ── */
.ft-success-panel {
  background: var(--ft-white);
  padding: 40px 24px;
  text-align: center;
}
.ft-success-panel[hidden] { display: none; }
.ft-success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ft-green);
  color: var(--ft-navy);
  font-size: 30px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  animation: ft-pop .3s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes ft-pop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
.ft-success-panel h3 { font-size: 22px; font-weight: 800; color: var(--ft-navy); margin: 0 0 10px; }
.ft-success-msg      { font-size: 15px; color: #607080; margin: 0 0 8px; }
.ft-success-email    { font-size: 13px; color: #A0AEBB; margin: 0; }

/* ── Loader ── */
.ft-loader {
  text-align: center;
  padding: 32px;
  color: #A0AEBB;
  font-size: 14px;
}

body.ft-modal-open { overflow: hidden; }

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

/* ── Error text ── */
.ft-error { color: #c0001a; font-size: 14px; padding: 12px 0; }

body.ft-modal-open { overflow: hidden; }

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

/* ── Responsive ── */
@media (max-width: 520px) {
  .ft-fields-grid { grid-template-columns: 1fr; }
  .ft-fields-grid .ft-field:last-child { grid-column: auto; }
  .ft-qty-row { flex-wrap: wrap; }
  .ft-total-price { margin-left: 0; }
  .ft-fixture-card { padding: 18px; }
}
