/*
 * Silent Heroes — AUTH (Logowanie / Rejestracja).
 *
 * Layout 2-kolumnowy desktop, single-col mobile.
 * Wzór: mockup z silentheroes.lovable.app/logowanie.
 */

/* ========== WRAPPER ========== */
.sh-auth-page .sh-auth-main { background: #fff; }
/* Cała strona auth: regular weight (400) — wildcard bije inne reguły z innych
   plików CSS które mogą celować w te same elementy (np. components-account.css
   ma `.sh-auth-switch a { font-weight: 600 }`). */
.sh-auth-page .sh-auth-main,
.sh-auth-page .sh-auth-main * { font-weight: 400; }
.sh-auth-wrap {
  padding: 56px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
}
.sh-auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

/* ========== HEADER (pełna szerokość, nad gridem) ========== */
.sh-auth-head {
  margin-bottom: 40px;
}
.sh-auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sh-black);
  color: #fff;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  font-family: var(--sh-font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sh-auth-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sh-red);
  box-shadow: 0 0 0 3px rgba(204, 27, 27, .25);
}
.sh-auth-h1 {
  font-family: var(--sh-font-sans);
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--sh-black);
  margin: 22px 0 10px;
  text-transform: none;
}
.sh-auth-sub {
  font-family: var(--sh-font-sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--sh-muted);
  margin: 0;
  max-width: 52ch;
}

/* ========== TAB SWITCHER ========== */
.sh-auth-switch {
  display: inline-flex;
  background: #EEEBE3;
  padding: 4px;
  border-radius: 999px;
  margin: 28px 0 0;
  gap: 2px;
}
.sh-auth-switch-btn {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--sh-font-sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--sh-muted);
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
  line-height: 1;
}
.sh-auth-switch-btn:hover:not(.is-active) { color: var(--sh-black); }
.sh-auth-switch-btn.is-active {
  background: var(--sh-black);
  color: #fff;
  box-shadow: 0 4px 14px rgba(17, 17, 17, .18);
}
.sh-auth-switch-btn:focus-visible {
  outline: none;
  box-shadow: var(--sh-focus-ring);
}

/* ========== ALERT (WC errors) ========== */
.sh-auth-alert {
  background: #FFE4E4;
  border: 1px solid #F1B5B5;
  color: #7A1313;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}
.sh-auth-alert p { margin: 0; }
.sh-auth-alert p + p { margin-top: 4px; }

/* ========== KARTA FORMULARZA ========== */
.sh-auth-card {
  background: #fff;
  border: 1px solid var(--sh-border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 12px 32px rgba(17, 17, 17, .06);
}

.sh-auth-form { display: flex; flex-direction: column; gap: 18px; }
.sh-auth-form.is-hidden { display: none; }

/* ========== FIELDS ========== */
.sh-field { display: flex; flex-direction: column; gap: 8px; }
.sh-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sh-field-label {
  font-family: var(--sh-font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sh-black);
}
.sh-field-link {
  font-family: var(--sh-font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--sh-red);
  text-decoration: none;
}
.sh-field-link:hover { color: var(--sh-red-dark); text-decoration: underline; }

.sh-field-input {
  position: relative;
  display: flex;
  align-items: center;
  background: #F5F3EE;
  border: 2px solid transparent;
  border-radius: 12px;
  transition: border-color .15s ease, background .15s ease;
  /* clip wszystko (autofill bg, focus ring inputu) do border-radius wrappera */
  overflow: hidden;
}
.sh-field-input:focus-within {
  background: #fff;
  border-color: var(--sh-black);
}
.sh-field-input.is-error {
  border-color: var(--sh-red);
  background: #FFF5F5;
}
.sh-field-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-left: 14px;
  color: var(--sh-gray-500, #888);
}
.sh-field-input input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 14px 14px 14px 10px;
  font-family: var(--sh-font-sans);
  font-size: 15px;
  color: var(--sh-black);
  min-width: 0;
}
.sh-field-input input:focus { outline: none; }
.sh-field-input input::placeholder { color: var(--sh-gray-400, #B5B0A5); }
.sh-field-input input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 999px #F5F3EE inset;
  -webkit-text-fill-color: var(--sh-black);
}
.sh-field-input:focus-within input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 999px #fff inset;
}

.sh-field-eye {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0 14px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  color: var(--sh-gray-500, #888);
  cursor: pointer;
  transition: color .15s ease;
}
.sh-field-eye:hover { color: var(--sh-black); }
.sh-field-eye svg { width: 18px; height: 18px; }
.sh-field-eye.is-visible svg path:last-of-type,
.sh-field-eye.is-visible svg circle {
  /* poprawione przez JS, ale fallback: zmiana koloru sugeruje stan */
  color: var(--sh-red);
}

.sh-field-hint {
  font-family: var(--sh-font-sans);
  font-size: 12.5px;
  color: var(--sh-muted);
  margin: 4px 2px 0;
  line-height: 1.45;
  transition: color .15s ease;
}
.sh-field-hint.is-err  { color: var(--sh-red, #CC1B1B); font-weight: 400; }
.sh-field-hint.is-ok   { color: var(--sh-green, #2D8B2D); font-weight: 400; }

/* ========== CHECKBOX ========== */
.sh-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
  font-family: var(--sh-font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--sh-ink);
}
.sh-check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.sh-check-box {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--sh-border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, border-color .15s ease;
  margin-top: 1px;
}
.sh-check input:checked + .sh-check-box {
  background: var(--sh-red);
  border-color: var(--sh-red);
}
.sh-check input:checked + .sh-check-box::after {
  content: "";
  width: 6px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-1px, -1px);
}
.sh-check input:focus-visible + .sh-check-box {
  box-shadow: var(--sh-focus-ring);
}
.sh-check-text a {
  color: var(--sh-red);
  text-decoration: none;
  font-weight: 400;
}
.sh-check-text a:hover { text-decoration: underline; }

/* ========== SUBMIT ========== */
.sh-auth-submit {
  appearance: none;
  border: 0;
  background: var(--sh-red);
  color: #fff;
  font-family: var(--sh-font-sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 22px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 16px rgba(204, 27, 27, .22);
  margin-top: 4px;
}
.sh-auth-submit:hover {
  background: var(--sh-red-dark);
  box-shadow: 0 10px 22px rgba(204, 27, 27, .28);
}
.sh-auth-submit:active { transform: translateY(1px); }
.sh-auth-submit:disabled,
.sh-auth-submit.is-locked {
  background: #E89E9E;
  box-shadow: none;
  cursor: not-allowed;
}
.sh-auth-submit.is-locked:hover { background: #D88A8A; }

/* Hint pod submit gdy formularz invalid — JS pokazuje konkretny powód. */
.sh-auth-hint {
  font-family: var(--sh-font-sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--sh-muted);
  margin: -8px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 18px;
}
.sh-auth-hint::before {
  content: "";
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2'><circle cx='12' cy='12' r='9'/><path d='M12 8v4'/><path d='M12 16h.01'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0;
  transition: opacity .15s ease;
}
.sh-auth-hint.is-visible::before { opacity: 1; }
.sh-auth-hint:empty { display: none; }
.sh-auth-submit svg { width: 18px; height: 18px; }
.sh-auth-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(204, 27, 27, .25);
}

/* ========== SEPARATOR „LUB" ========== */
.sh-auth-sep {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: center;
  margin: 4px 0;
}
.sh-auth-sep::before,
.sh-auth-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--sh-border);
}
.sh-auth-sep span {
  font-family: var(--sh-font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sh-muted);
}

/* ========== Nextend Google override ========== */
.sh-auth-card .nsl-container { margin: 0 !important; }
.sh-auth-card .nsl-container .nsl-container-buttons { display: block !important; }
.sh-auth-card .nsl-container .nsl-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  background: #fff !important;
  color: var(--sh-black) !important;
  border: 1px solid var(--sh-border) !important;
  border-radius: 10px !important;
  padding: 13px 18px !important;
  font-family: var(--sh-font-sans) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: none !important;
  transition: background .15s ease, border-color .15s ease;
  min-height: 0 !important;
  line-height: 1.2 !important;
}
.sh-auth-card .nsl-container .nsl-button:hover {
  background: #F5F3EE !important;
  border-color: #D0CEC8 !important;
}
.sh-auth-card .nsl-container .nsl-button-svg-container {
  margin: 0 !important;
  padding: 0 !important;
  width: 20px !important;
  height: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
}
.sh-auth-card .nsl-container .nsl-button-svg-container svg { width: 20px !important; height: 20px !important; }
.sh-auth-card .nsl-container .nsl-button-label-container {
  font-family: var(--sh-font-sans) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ========== ALT LINE (bottom card) ========== */
.sh-auth-altline {
  text-align: center;
  font-family: var(--sh-font-sans);
  font-size: 14px;
  color: var(--sh-muted);
  margin: 6px 0 0;
}
.sh-auth-altline a {
  color: var(--sh-red);
  font-weight: 400;
  text-decoration: none;
}
.sh-auth-altline a:hover { text-decoration: underline; }

/* ========== PRAWA KOLUMNA — PANEL KLUBU ========== */
.sh-auth-col-aside { display: flex; flex-direction: column; gap: 16px; }

.sh-auth-panel {
  position: relative;
  background: var(--sh-black);
  color: #fff;
  border-radius: 16px;
  padding: 32px;
  overflow: hidden;
}
.sh-auth-panel-kicker {
  display: inline-block;
  color: var(--sh-red);
  font-family: var(--sh-font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.sh-auth-panel-h {
  font-family: var(--sh-font-sans);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 12px;
  color: #fff;
  text-transform: none;
  position: relative;
}
.sh-auth-panel-p {
  font-family: var(--sh-font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .76);
  margin: 0;
  max-width: 50ch;
  position: relative;
}

/* ========== BENEFITS ========== */
.sh-auth-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sh-auth-benefit {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--sh-border);
  border-radius: 14px;
  padding: 16px 16px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, .04);
  height: 100%;
  min-height: 84px;
  margin: 0 !important; /* base.css daje li+li { margin-top: 8px } — wybija siatkę w grid 2x2 */
}
.sh-auth-benefit-ic {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F5F3EE;
  border-radius: 10px;
  color: var(--sh-black);
}
.sh-auth-benefit-ic svg { width: 20px; height: 20px; }
.sh-auth-benefit-text { min-width: 0; }
.sh-auth-benefit-text h3 {
  font-family: var(--sh-font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--sh-black);
  margin: 0 0 2px;
  letter-spacing: -0.005em;
  text-transform: none;
  line-height: 1.25;
}
.sh-auth-benefit-text p {
  font-family: var(--sh-font-sans);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--sh-muted);
  margin: 0;
}

/* ========== TRUST BADGE ========== */
.sh-auth-trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sh-font-sans);
  font-size: 13px;
  color: var(--sh-muted);
  margin: 8px 0 0;
}
.sh-auth-trust svg { width: 16px; height: 16px; color: var(--sh-green, #2D8B2D); flex-shrink: 0; }

/* ========== BREAKPOINTS ========== */
@media (max-width: 1024px) {
  .sh-auth-grid {
    grid-template-columns: 1fr;
    max-width: 640px;
    gap: 32px;
  }
  .sh-auth-col-aside { padding-top: 0; }
}

@media (max-width: 600px) {
  .sh-auth-wrap { padding: 32px 16px 56px; }
  .sh-auth-card { padding: 22px 18px; border-radius: 14px; }
  .sh-auth-panel { padding: 24px 22px; }
  .sh-auth-benefit { padding: 14px 14px; gap: 10px; grid-template-columns: 36px 1fr; }
  .sh-auth-benefit-ic { width: 36px; height: 36px; }
  .sh-auth-benefit-ic svg { width: 18px; height: 18px; }
  .sh-auth-benefit-text h3 { font-size: 13.5px; }
  .sh-auth-benefit-text p { font-size: 12px; line-height: 1.4; }
  .sh-auth-h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .sh-auth-sub { font-size: 14.5px; }
  .sh-auth-switch {
    display: flex;
    width: 100%;
  }
  .sh-auth-switch-btn {
    flex: 1;
    text-align: center;
    padding: 11px 18px;
    font-size: 13.5px;
  }
  .sh-auth-submit { padding: 14px 18px; font-size: 13px; }
}
