/* Antalya Dance Cup 2026 - mobile-first registration UI
   Simple, readable, touch-friendly. No framework dependency. */

:root {
  --color-bg: #0f1115;
  --color-surface: #171a21;
  --color-surface-2: #1f232c;
  --color-border: #2b3040;
  --color-text: #eef0f4;
  --color-text-muted: #9aa2b1;
  /* Ana tanıtım sitesiyle ortak marka kırmızısı (bkz. /styles.css) */
  --color-primary: #e50914;
  --color-primary-dark: #b90710;
  --color-success: #2fbf71;
  --color-success-bg: #123321;
  --color-danger: #ff5c5c;
  --color-danger-bg: #331414;
  --radius: 12px;
  --max-width: 640px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 16px 48px;
}

/* Ana tanıtım sitesindeki üst duyuru bandının karşılığı - iki taraf aynı
   marka çubuğuyla açılsın diye. */
.site-banner {
  background: var(--color-primary);
  color: #fff;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 9px;
}
.site-banner .dot { opacity: 0.55; }
.site-banner .days-left {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 900;
}

/* Klavye kullanıcısı için görünür odak halkası */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Language switcher: sticky top bar, TR | EN | RU. Plain links (no JS
   required) so it works identically with or without JavaScript. */
nav.lang-switcher {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.lang-switcher-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
}
.lang-links {
  display: flex;
  gap: 4px;
}

/* Ana sitedeki .logo ile aynı kimlik */
a.site-brand {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
a.site-brand span { color: var(--color-primary); }
a.lang-link {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  text-decoration: none;
  border: 1px solid transparent;
}
a.lang-link:hover { color: var(--color-text); }
a.lang-link.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-surface-2);
}
a.lang-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

header.app-header {
  padding: 20px 16px 10px;
  text-align: center;
}
header.app-header h1 {
  font-size: 1.25rem;
  margin: 0 0 4px;
}
header.app-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.step-list { display: flex; flex-direction: column; gap: 12px; }

a.button, button, input[type="submit"] {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a.button:active, button:active, input[type="submit"]:active { background: var(--color-primary-dark); }

a.button.secondary, button.secondary {
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

a.button.block-link {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
a.button.block-link:active { background: var(--color-surface); }
a.button.block-link small { color: var(--color-text-muted); font-weight: 400; }

.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 14px 0 6px;
}
label:first-child { margin-top: 0; }

input[type="text"], input[type="date"], input[type="email"], input[type="tel"], input[type="password"], select {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: 1rem;
}

fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px;
  margin: 0 0 16px;
}
fieldset legend { padding: 0 6px; color: var(--color-text-muted); font-size: 0.85rem; }

.radio-row { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.radio-row label {
  flex: 1;
  min-width: 120px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  margin: 0;
  color: var(--color-text);
  font-size: 0.9rem;
}
.radio-row input { display: none; }
.radio-row input:checked + span,
.radio-row label:has(input:checked) { color: var(--color-primary); border-color: var(--color-primary); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge.eligible { background: var(--color-success-bg); color: var(--color-success); }
.badge.not-eligible { background: var(--color-danger-bg); color: var(--color-danger); }
.badge.pending { background: var(--color-surface-2); color: var(--color-text-muted); }

.alert { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; font-size: 0.92rem; white-space: pre-line; }
.alert.success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success); }
.alert.error { background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid var(--color-danger); }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--color-border); }
th { color: var(--color-text-muted); font-weight: 600; }

.athlete-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.athlete-row:last-child { border-bottom: none; }
.athlete-row .meta { font-size: 0.8rem; color: var(--color-text-muted); }
.athlete-row .remove { background: transparent; border: 1px solid var(--color-danger); color: var(--color-danger); width: auto; padding: 6px 10px; border-radius: 8px; }

.distribution-bar { height: 10px; border-radius: 6px; background: var(--color-surface-2); overflow: hidden; display: flex; margin: 8px 0; }
.distribution-bar .same { background: var(--color-primary); }
.distribution-bar .lower { background: #ffb020; }

.breadcrumb { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--color-text-muted); }

.reg-number { font-size: 1.4rem; font-weight: 800; letter-spacing: 0.5px; }

/* Ana sitedeki sponsor/organizatör footer'ının karşılığı: aynı bölüm
   başlıkları ve logo altı isimleriyle, dar ekrana uygun ölçekte. */
footer.app-footer {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  padding: 32px 16px 24px;
  margin-top: 32px;
  border-top: 1px solid var(--color-border);
}

footer.app-footer .footer-block {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--color-border);
}

/* Kayıt desteği: formu bitiremeyen arasın diye, sponsorlardan ÖNCE. */
footer.app-footer .support-note {
  max-width: 460px;
  margin: 0 auto 22px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface-2);
  line-height: 1.55;
}
footer.app-footer .support-note strong {
  display: block;
  color: var(--color-text);
  font-size: 0.84rem;
  margin-bottom: 4px;
}
footer.app-footer .support-note span {
  display: block;
  font-size: 0.78rem;
}
footer.app-footer a.support-phone {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}
footer.app-footer a.support-phone:hover {
  background: var(--color-primary);
  color: #fff;
}

footer.app-footer .footer-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

footer.app-footer .footer-logos {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

footer.app-footer .footer-logo {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

footer.app-footer .footer-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

footer.app-footer .footer-logo figcaption {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--color-text);
}

footer.app-footer a.back-to-site {
  display: inline-block;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 16px;
}
footer.app-footer a.back-to-site:hover { color: var(--color-primary); }

footer.app-footer .footer-tagline {
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

/* -------------------------------------------------------------------
   Zorunlu alanlar ve alan bazlı hata vurgusu
   -------------------------------------------------------------------
   Amaç: kullanıcı formu gönderdikten SONRA "başa dön" ile veri
   kaybetmek yerine, eksiği daha doldururken görsün. Zorunlu alanlar
   kırmızı yıldızla, hatalı alanlar kırmızı çerçeve + kırmızı uyarı
   satırıyla işaretlenir. */
.req {
  color: var(--color-danger);
  font-weight: 900;
  margin-left: 2px;
}

.required-hint {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin: 0 0 14px;
}

input.is-invalid, select.is-invalid {
  border-color: var(--color-danger);
  background: var(--color-danger-bg);
}

.field-error {
  color: var(--color-danger);
  font-size: 0.78rem;
  font-weight: 600;
  margin: 6px 0 0;
}

fieldset.has-error { border-color: var(--color-danger); }
fieldset.has-error > legend { color: var(--color-danger); }

.alert.info {
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-primary);
}

/* Son onay kutusu.
   Kayıt, bu düğmeye basılmadan yarışma listesine geçmiyor; kutu bu yüzden
   sıradan bir kart gibi değil, dikkat çeken bir uyarı gibi görünür. */
.submit-callout {
  border-color: var(--color-primary);
  border-width: 2px;
}
.submit-callout h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--color-primary);
}
.submit-callout p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.submit-callout form { margin: 0; }
.submit-callout button { width: 100%; }
