﻿/* =========================================================
   auth_styles.css — Statsmaker Auth & Profile Pages
   ========================================================= */

/* ── Auth page body background ──────────────────────────── */
.sm-auth-body {
  background: linear-gradient(145deg, #f3f2ff 0%, #eef0ff 55%, #f0f5ff 100%) !important;
  min-height: 100dvh;
}

/* ── GLOBAL: Fix Sneat's uppercase form-label on auth pages ─
   Sneat's core.css applies text-transform:uppercase + letter-spacing
   to .form-label. We override it for ALL auth & profile pages.     */
.authentication-wrapper .form-label,
.sm-auth-body .form-label,
.sm-auth-body .form-check-label {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: #566a7f !important;
  margin-bottom: 0.4rem !important;
}

/* ── Better card on auth pages ──────────────────────────── */
.authentication-wrapper .authentication-inner > .card {
  border-radius: 1rem !important;
  border: 1px solid rgba(105, 108, 255, 0.12) !important;
  box-shadow: 0 4px 32px rgba(105, 108, 255, 0.10),
              0 1px 4px  rgba(0, 0, 0, 0.05) !important;
}
.authentication-wrapper .card-body {
  padding: 2rem 2rem 1.75rem !important;
}
@media (max-width: 520px) {
  .authentication-wrapper .card-body { padding: 1.5rem 1.25rem 1.5rem !important; }
}

/* ── Input groups: icon prefix / pw-toggle suffix ─────────
   Used in: login (pw toggle), signup (email icon + pw toggle)    */
.sm-ig-prefix {
  background: #fff !important;
  border-right: none !important;
  color: #a1acb8;
  transition: color 0.15s, border-color 0.15s;
}
.sm-ig-prefix + .form-control {
  border-left: none !important;
  padding-left: 0.5rem !important;
}
/* Focus ring on the whole group */
.input-group:focus-within .sm-ig-prefix {
  border-color: #696cff !important;
  color: #696cff;
}
.input-group:focus-within .sm-ig-prefix + .form-control {
  border-color: #696cff;
  box-shadow: none !important;
}
.input-group:focus-within {
  border-radius: 0.5rem;
  box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.14);
}
/* Prevent individual focus box-shadow when inside group */
.input-group .form-control:focus {
  box-shadow: none !important;
  border-color: #696cff;
}

/* pw-toggle suffix button */
.sm-pw-toggle {
  background: #fff !important;
  border-left: none !important;
  border-color: #dbdade !important;
  color: #a1acb8 !important;
  transition: color 0.15s, border-color 0.15s;
}
.sm-pw-toggle:hover,
.sm-pw-toggle:focus { color: #696cff !important; outline: none !important; box-shadow: none !important; }
.input-group:focus-within .sm-pw-toggle {
  border-color: #696cff !important;
  color: #696cff !important;
}


.authentication-signup .authentication-inner {
  max-width: 480px !important;
}
.authentication-signup .authentication-inner::before,
.authentication-signup .authentication-inner::after {
  display: none !important;
}

/* Full-screen wizard feel on very small phones */
@media (max-width: 520px) {
  .authentication-signup {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    min-height: 100dvh;
    align-items: flex-start !important;
  }
  .authentication-signup .authentication-inner {
    max-width: 100% !important;
    width: 100% !important;
    min-height: 100dvh;
  }
  .authentication-signup .card {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    min-height: 100dvh;
  }
}

/* ── Step indicator (progress nav) ─────────────────────── */
.sm-wizard-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sm-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sm-step-item[data-step] { cursor: pointer; }

.sm-step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #dbdade;
  background: #fff;
  color: #a1acb8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.sm-step-lbl {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #a1acb8;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.sm-step-connector {
  flex: 1;
  height: 2px;
  background: #dbdade;
  margin: 0 6px;
  margin-bottom: 18px; /* align with circle center */
  transition: background 0.2s;
}

/* Active step */
.sm-step-item.sm-step-active .sm-step-circle {
  border-color: #696cff;
  background: #696cff;
  color: #fff;
}
.sm-step-item.sm-step-active .sm-step-lbl { color: #696cff; }

/* Done step */
.sm-step-item.sm-step-done .sm-step-circle {
  border-color: #696cff;
  background: #ebebff;
  color: #696cff;
}
.sm-step-item.sm-step-done .sm-step-lbl { color: #696cff; }

/* Connector fill when step before it is done */
.sm-step-item.sm-step-done + .sm-step-connector { background: #696cff; }

/* ── Step sections ──────────────────────────────────────── */
.sm-wizard-step { animation: sm-fade-in 0.2s ease; }

@keyframes sm-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Step heading ───────────────────────────────────────── */
.sm-step-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #566a7f;
  margin: 0;
}
.sm-step-desc {
  font-size: 0.8125rem;
  color: #a1acb8;
  margin: 0.2rem 0 0;
}

/* ── Labels ─────────────────────────────────────────────── */
.sm-lbl {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #566a7f;
  margin-bottom: 0.35rem;
}
.sm-lbl-req::after {
  content: ' *';
  color: #ff3e1d;
}

/* ── Touch-friendly inputs ──────────────────────────────── */
.sm-wizard-step .form-control,
.sm-wizard-step .form-select {
  height: 44px;
  font-size: 0.9375rem;
  border-radius: 0.375rem;
  border-color: #dbdade;
  color: #566a7f;
}
.sm-wizard-step .form-control:focus,
.sm-wizard-step .form-select:focus {
  border-color: #696cff;
  box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.12);
}

/* ── Field errors ───────────────────────────────────────── */
.sm-field-err {
  font-size: 0.75rem;
  color: #ff3e1d;
  margin-top: 0.3rem;
}
.is-invalid { border-color: #ff3e1d !important; }

/* ── Main CTA button ────────────────────────────────────── */
.sm-btn-main {
  height: 48px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0.5rem;
}

.sm-btn-skip {
  height: 44px;
  font-size: 0.875rem;
  color: #a1acb8;
  border-color: #dbdade;
}
.sm-btn-skip:hover { color: #566a7f; border-color: #a1acb8; }

/* ── Marketing checkbox row ─────────────────────────────── */
.sm-mktg-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #f8f7ff;
  border: 1px solid #e4e3ff;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #566a7f;
  line-height: 1.5;
}
.sm-mktg-row input[type=checkbox] {
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: #696cff;
}

/* ── Interest search widget ─────────────────────────────── */
.sm-interest-widget { position: relative; }

.sm-isearch-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.sm-isearch-icon {
  position: absolute;
  left: 0.875rem;
  font-size: 1.125rem;
  color: #a1acb8;
  pointer-events: none;
  z-index: 1;
}

.sm-isearch-input {
  padding-left: 2.5rem !important;
  padding-right: 2.75rem !important;
  height: 48px !important;
  font-size: 0.9375rem;
  border-radius: 0.5rem !important;
}

.sm-isearch-spinner {
  position: absolute;
  right: 0.875rem;
}

/* ── Search results dropdown ────────────────────────────── */
.sm-isearch-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dbdade;
  border-radius: 0.5rem;
  box-shadow: 0 6px 24px rgba(105, 108, 255, 0.12);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1050;
  overscroll-behavior: contain;
}

.sm-empty-msg {
  padding: 1rem;
  text-align: center;
  color: #a1acb8;
  font-size: 0.875rem;
  margin: 0;
}

.sm-result-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f1f0f4;
}
.sm-result-row:last-child { border-bottom: none; }
.sm-result-row:hover,
.sm-result-row:focus { background: #f5f5ff; outline: none; }
.sm-result-row.sm-result-sel { background: #ebebff; }

.sm-result-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #f1f0f4;
  background: #f5f5f9;
}

.sm-result-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sm-result-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #566a7f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sm-result-meta {
  font-size: 0.75rem;
  color: #a1acb8;
}

.sm-type-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 2rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.sm-pill-competition { background: #ffe4c8; color: #b55e00; }
.sm-pill-equipe      { background: #c8f3d0; color: #1a7a3a; }
.sm-pill-joueur      { background: #d4e3ff; color: #1855b5; }

.sm-result-chk {
  font-size: 1.125rem;
  color: #696cff;
  flex-shrink: 0;
}

/* ── Selected interest tags ─────────────────────────────── */
.sm-interest-tags {
  margin-top: 0.75rem;
  border: 1px solid #e4e3ff;
  border-radius: 0.5rem;
  background: #fafaff;
  overflow: hidden;
}

.sm-tags-hdr {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #566a7f;
  background: #ebebff;
  border-bottom: 1px solid #e4e3ff;
}

.sm-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
}

.sm-itag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem 0.3rem 0.4rem;
  background: #fff;
  border: 1px solid #dbdade;
  border-radius: 2rem;
  max-width: 200px;
}

.sm-itag-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #f5f5f9;
}

.sm-itag-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sm-itag-nom {
  font-size: 0.75rem;
  font-weight: 600;
  color: #566a7f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.sm-itag-sub {
  font-size: 0.65rem;
  color: #a1acb8;
}

.sm-itag-rm {
  flex-shrink: 0;
  border: none;
  background: none;
  color: #a1acb8;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  transition: color 0.15s, background 0.15s;
}
.sm-itag-rm:hover { color: #ff3e1d; background: #ffeeed; }

/* ── Old single-page signup styles (kept for profile/other pages) */
.authentication-wide {
  overflow: auto !important;
}
.authentication-wide .authentication-inner {
  max-width: 960px !important;
}
.authentication-wide .authentication-inner::before,
.authentication-wide .authentication-inner::after {
  display: none !important;
}

.sm-auth-section {
  padding-top: 1.375rem;
  margin-top: 1.375rem;
  border-top: 1px solid #e7e7e8;
}

.sm-auth-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #566a7f;
  margin-bottom: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sm-auth-section-title .step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #696cff;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sm-auth-section-title .optional-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 400;
  color: #a1acb8;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
}

.sm-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.sm-field-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.field-block { display: flex; flex-direction: column; }
.field-block > label { font-size: 0.8125rem; font-weight: 600; color: #566a7f; margin-bottom: 0.35rem; }
.field-block .field-help { font-size: 0.75rem; color: #a1acb8; margin-top: 0.3rem; }
.field-block .field-errors { font-size: 0.75rem; color: #ff3e1d; margin-top: 0.3rem; }

.field-has-error .form-control,
.field-has-error .form-select {
  border-color: #ff3e1d !important;
  box-shadow: 0 0 0 0.15rem rgba(255, 62, 29, 0.12) !important;
}

.form-select[multiple] { min-height: 130px; background-color: #f9f9ff; }

.sm-marketing-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: #f8f7ff;
  border: 1px solid #e4e3ff;
  border-radius: 0.5rem;
  margin-top: 1.375rem;
}
.sm-marketing-row input[type=checkbox] { margin-top: 0.15rem; flex-shrink: 0; }
.sm-marketing-row label { font-size: 0.875rem; color: #566a7f; line-height: 1.5; cursor: pointer; }

/* ── Profile page ───────────────────────────────────────── */
.sm-profile-bg { background: #f5f5f9; min-height: 100vh; padding: 2rem 0 4rem; }

.sm-profile-hero { padding: 1.5rem 0 1.25rem; border-bottom: 1px solid #e7e7e8; margin-bottom: 1.75rem; }
.sm-profile-hero h1 { font-size: 1.5rem; font-weight: 700; color: #566a7f; margin: 0 0 0.25rem; }
.sm-profile-hero p { margin: 0; font-size: 0.875rem; color: #a1acb8; }

.sm-card { background: #fff; border: 1px solid #dbdade; border-radius: 0.5rem; margin-bottom: 1.5rem; }

.sm-card-header { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.5rem; border-bottom: 1px solid #f1f0f4; }
.sm-card-header .icon-wrap { width: 36px; height: 36px; border-radius: 50%; background: #ebebff; display: flex; align-items: center; justify-content: center; color: #696cff; font-size: 1rem; flex-shrink: 0; }
.sm-card-title { font-size: 0.9375rem; font-weight: 600; color: #566a7f; margin: 0; }
.sm-card-body { padding: 1.5rem; }
.sm-card-body .field-block > label { font-size: 0.8rem; }
.sm-card-body .form-select[multiple] { min-height: 160px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .sm-field-grid,
  .sm-field-grid-3 { grid-template-columns: 1fr !important; }
}
@media (max-width: 767px) {
  .sm-card-body { padding: 1rem; }
}
