/* ============================================
   Registracija — форма в стиле Tendance
   Navy #2E3166 · Sky #87B2DF · Cream #F4F4F7
   ============================================ */

.reg-main {
  background: linear-gradient(180deg, #fff 0%, var(--cream, #F4F4F7) 100%);
}

/* HERO ---------------------------------------- */
.reg-hero {
  padding: 4rem 0 2.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(135, 178, 223, 0.18), transparent 70%),
    #fff;
  border-bottom: 1px solid rgba(46, 49, 102, 0.06);
}
.reg-kicker {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sky, #87B2DF);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.reg-hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  font-weight: 600;
  color: var(--navy, #2E3166);
  margin: 0 0 0.7rem;
  line-height: 1.1;
}
.reg-hero .accent { color: var(--sky, #87B2DF); font-style: italic; }
.reg-lead {
  color: #555;
  font-size: 1.05rem;
  max-width: 36rem;
  margin: 0 auto;
}

/* LAYOUT --------------------------------------- */
.reg-section { padding: 2.5rem 0 4rem; }
.reg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .reg-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .reg-side { order: -1; }
}

/* FORM CARD ------------------------------------ */
.reg-form {
  background: #fff;
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow:
    0 1px 2px rgba(46, 49, 102, 0.04),
    0 12px 32px rgba(46, 49, 102, 0.07);
  border: 1px solid rgba(46, 49, 102, 0.06);
}
@media (max-width: 600px) {
  .reg-form { padding: 1.25rem; border-radius: 14px; }
}

/* SELECTED STYLE BANNER ------------------------ */
.reg-style-banner[hidden] { display: none !important; }
.reg-style-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--navy, #2E3166), #383c77);
  color: #fff;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.reg-style-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(135, 178, 223, 0.35), transparent 60%);
  pointer-events: none;
}
.reg-style-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  position: relative;
  z-index: 1;
}
.reg-style-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
}
.reg-style-banner strong {
  font-size: 1.15rem;
  font-weight: 600;
}
.reg-style-meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}
.reg-style-change {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.18s;
  position: relative;
  z-index: 1;
}
.reg-style-change:hover { background: rgba(255, 255, 255, 0.22); }

/* FIELDSET ------------------------------------- */
.reg-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.75rem;
}
.reg-fieldset legend {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy, #2E3166);
  margin-bottom: 1rem;
  padding: 0;
}

.reg-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 0.85rem;
  align-items: end;
}
.reg-row > .reg-field { min-width: 0; }
.reg-row > .reg-field input,
.reg-row > .reg-field select { width: 100%; box-sizing: border-box; }
@media (max-width: 600px) {
  .reg-row { grid-template-columns: 1fr; }
}
.reg-row .reg-field-sm input { text-align: center; }

.reg-fieldset .reg-row + .reg-field,
.reg-fieldset .reg-field + .reg-field,
.reg-fieldset .reg-field + .reg-sub,
.reg-fieldset .reg-sub + .reg-field,
.reg-fieldset .reg-row + .reg-row {
  margin-top: 0.85rem;
}

/* FIELDS --------------------------------------- */
.reg-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: none;
  padding: 0;
  margin: 0;
}
.reg-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy, #2E3166);
  letter-spacing: 0.01em;
}
.reg-label em {
  color: #d33;
  font-style: normal;
  margin-left: 2px;
}
.reg-hint {
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.25rem;
}

.reg-form input[type="text"],
.reg-form input[type="number"],
.reg-form input[type="tel"],
.reg-form input[type="email"],
.reg-form select,
.reg-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid rgba(46, 49, 102, 0.18);
  border-radius: 10px;
  background: #fff;
  color: #1a1c40;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  -webkit-appearance: none;
  appearance: none;
}
.reg-form select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'><path fill='none' stroke='%232E3166' stroke-width='2' d='M1 1l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
}
.reg-form textarea { resize: vertical; min-height: 88px; }

.reg-form input:hover,
.reg-form select:hover,
.reg-form textarea:hover {
  border-color: rgba(46, 49, 102, 0.35);
}
.reg-form input:focus,
.reg-form select:focus,
.reg-form textarea:focus {
  outline: none;
  border-color: var(--sky, #87B2DF);
  box-shadow: 0 0 0 4px rgba(135, 178, 223, 0.18);
  background: #fff;
}
.reg-form input:invalid:not(:placeholder-shown),
.reg-form select.error,
.reg-form input.error {
  border-color: #d33;
  box-shadow: 0 0 0 4px rgba(221, 51, 51, 0.1);
}

/* PILLS (radio / checkbox) --------------------- */
.reg-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.reg-pill {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.reg-pill input { position: absolute; opacity: 0; pointer-events: none; }
.reg-pill span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border: 1.5px solid rgba(46, 49, 102, 0.18);
  border-radius: 999px;
  font-size: 0.92rem;
  color: #444;
  background: #fff;
  transition: all 0.18s;
  white-space: nowrap;
}
.reg-pill:hover span {
  border-color: var(--sky, #87B2DF);
  background: rgba(135, 178, 223, 0.08);
}
.reg-pill input:checked + span {
  background: var(--navy, #2E3166);
  border-color: var(--navy, #2E3166);
  color: #fff;
}
.reg-pill input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(135, 178, 223, 0.3);
}

.reg-contact-pref { border: none; padding: 0; margin: 0; }

/* SUB-FIELDS (sport level) --------------------- */
.reg-sub[hidden] { display: none !important; }
.reg-sub {
  margin-top: 0.85rem;
  padding: 1rem;
  background: rgba(135, 178, 223, 0.08);
  border-left: 3px solid var(--sky, #87B2DF);
  border-radius: 8px;
  animation: subSlide 0.25s ease;
}
@keyframes subSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CHECKBOX (consent) --------------------------- */
.reg-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
  margin-top: 1rem;
  line-height: 1.45;
}
.reg-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--navy, #2E3166);
  cursor: pointer;
  flex-shrink: 0;
}
.reg-check a { color: var(--navy, #2E3166); text-decoration: underline; }
.reg-check em { color: #d33; font-style: normal; }

/* ACTIONS -------------------------------------- */
.reg-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.reg-actions .btn-lg {
  width: 100%;
  max-width: 360px;
  padding: 0.95rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  position: relative;
}
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
.btn-spinner[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
.reg-actions .btn[disabled] { opacity: 0.7; cursor: progress; }
.reg-disclaimer {
  font-size: 0.82rem;
  color: #888;
  margin: 0;
}

/* STATUS --------------------------------------- */
.reg-status {
  margin-top: 1rem;
  padding: 0;
  text-align: center;
  font-size: 0.95rem;
}
.reg-status:empty { display: none; }
.reg-status.success {
  padding: 1rem;
  background: linear-gradient(135deg, rgba(135, 178, 223, 0.18), rgba(46, 49, 102, 0.06));
  color: var(--navy, #2E3166);
  border-radius: 10px;
  border: 1px solid rgba(46, 49, 102, 0.12);
}
.reg-status.error {
  padding: 0.85rem;
  background: rgba(221, 51, 51, 0.08);
  color: #b22;
  border-radius: 10px;
  border: 1px solid rgba(221, 51, 51, 0.2);
}
.reg-status.success strong { display: block; font-size: 1.1rem; margin-bottom: 0.3rem; }

/* SIDE COLUMN ---------------------------------- */
.reg-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 100px;
}
@media (max-width: 900px) {
  .reg-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .reg-side > * { flex: 1 1 240px; }
}
.reg-side-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem;
  border: 1px solid rgba(46, 49, 102, 0.08);
  box-shadow: 0 4px 14px rgba(46, 49, 102, 0.04);
}
.reg-side-card h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy, #2E3166);
  margin: 0 0 0.7rem;
}
.reg-side-card p { margin: 0.4rem 0; color: #555; font-size: 0.93rem; }
.reg-side-card a { color: var(--navy, #2E3166); text-decoration: none; font-weight: 500; }
.reg-side-card a:hover { color: var(--sky, #87B2DF); }
.reg-steps {
  margin: 0;
  padding-left: 1.1rem;
  color: #555;
  font-size: 0.93rem;
}
.reg-steps li { margin-bottom: 0.55rem; line-height: 1.45; }
.reg-steps strong { color: var(--navy, #2E3166); }
.reg-side-tip {
  background: #fff;
  border: 1px solid rgba(46, 49, 102, 0.12);
  border-left: 4px solid var(--sky, #87B2DF);
  box-shadow: 0 4px 14px rgba(46, 49, 102, 0.06);
}
.reg-side-tip h3 { color: var(--navy, #2E3166); font-weight: 700; }
.reg-side-tip p { color: #2E3166; }
.reg-side-tip strong, .reg-side-tip b { color: var(--navy, #2E3166); }

/* SUCCESS PAGE STATE --------------------------- */
.reg-form.is-submitted .reg-fieldset,
.reg-form.is-submitted .reg-actions,
.reg-form.is-submitted .reg-style-banner { display: none; }

/* SELF-REGISTER TOGGLE ------------------------- */
.reg-self-check {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.9rem;
  background: rgba(135, 178, 223, 0.10);
  border: 1.5px solid rgba(135, 178, 223, 0.30);
  border-radius: 10px;
  transition: background 0.18s, border-color 0.18s;
}
.reg-self-check:hover {
  background: rgba(135, 178, 223, 0.16);
  border-color: rgba(135, 178, 223, 0.45);
}
.reg-self-check input:checked ~ span {
  color: var(--navy, #2E3166);
  font-weight: 600;
}
.reg-self-check.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}
.reg-self-check.is-disabled:hover {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}
.reg-self-check.is-disabled input { cursor: not-allowed; }
.reg-self-hint {
  margin: -0.4rem 0 0.85rem;
  padding: 0 0.2rem;
  font-size: 0.82rem;
  color: #888;
}

/* PARENT FIELD HIDDEN STATE -------------------- */
#parentNameWrap.is-hidden {
  display: none;
}

/* CONTACT ROW (telefon + email) ---------------- */
.reg-contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 640px) {
  .reg-contact-row { grid-template-columns: 1fr; }
}
.reg-contact-row .reg-field { min-width: 0; }
.reg-contact-row .reg-field input { width: 100%; box-sizing: border-box; }

/* HONEYPOT (невидимые поля от ботов) -------- */
.reg-honeypot,
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  tab-index: -1;
}

/* QUICK REGISTER BUTTONS (in style cards / schedule) */
.btn-register-style {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--navy, #2E3166);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s;
  border: 1.5px solid var(--navy, #2E3166);
}
.btn-register-style:hover {
  background: var(--sky, #87B2DF);
  border-color: var(--sky, #87B2DF);
  color: #fff;
  transform: translateY(-1px);
}
.btn-register-style svg { width: 14px; height: 14px; }
