/* ===================================================================
   SOU MENGÃO — ESTILOS DE AUTENTICAÇÃO, CONTA & SOFT GATES
   =================================================================== */

/* Botão de Conta no Header */
.header-auth-wrap {
  display: flex;
  align-items: center;
  margin-left: 0.25rem;
  flex-shrink: 0;
}

.header-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem clamp(0.55rem, 0.7vw, 0.78rem);
  border-radius: 999px;
  background: linear-gradient(135deg, #241a15 0%, #15100e 100%);
  border: 1px solid rgba(229, 184, 34, 0.4);
  color: #f7eed8;
  font-family: inherit;
  font-size: clamp(0.7rem, 0.74vw, 0.76rem);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-auth-btn:hover {
  background: linear-gradient(135deg, #36251c 0%, #1c1410 100%);
  border-color: #ffd700;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(229, 184, 34, 0.25);
}

.header-auth-btn.is-logged-in {
  background: linear-gradient(135deg, #8b0000 0%, #4a0000 100%);
  border-color: rgba(229, 184, 34, 0.6);
  color: #ffd700;
}

@media (max-width: 1220px) {
  .header-auth-wrap {
    margin-left: auto;
    margin-right: 0.25rem;
    flex-shrink: 1;
    min-width: 0;
  }

  .header-auth-btn {
    padding: 0.38rem 0.68rem;
    font-size: 0.74rem;
    gap: 0.32rem;
    max-width: 175px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-auth-btn__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .header-auth-wrap {
    margin-left: auto;
    margin-right: 0.15rem;
  }

  .header-auth-btn {
    padding: 0.34rem 0.56rem;
    font-size: 0.68rem;
    gap: 0.25rem;
    max-width: 148px;
  }

  .sm-auth-modal {
    padding: 0.65rem;
    align-items: flex-end;
  }

  .sm-auth-modal__dialog {
    padding: 1.15rem 1rem;
    max-height: 92dvh;
    border-radius: 16px 16px 12px 12px;
    gap: 0.9rem;
  }

  .sm-auth-tab {
    font-size: 0.74rem;
    padding: 0.55rem 0.35rem;
  }

  .sm-auth-input {
    font-size: 16px; /* Evita auto-zoom no iOS Safari */
    padding: 0.62rem 0.8rem;
  }

  .sm-soft-gate-overlay {
    padding: 0.85rem;
  }

  .sm-soft-gate-card {
    padding: 1.25rem 1rem;
  }

  .sm-soft-gate-title {
    font-size: 1.08rem;
  }
}

@media (max-width: 370px) {
  .header-auth-btn {
    padding: 0.3rem 0.48rem;
    font-size: 0.64rem;
    max-width: 112px;
  }
}

/* Modais de Autenticação e Perfil */
.sm-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.sm-auth-modal[hidden] {
  display: none !important;
}

.sm-auth-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sm-auth-modal__dialog {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  background: linear-gradient(180deg, #181310 0%, #0d0a09 100%);
  border: 1.5px solid rgba(229, 184, 34, 0.45);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(229, 184, 34, 0.15);
  padding: 1.5rem;
  color: #f7eed8;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.sm-auth-modal__dialog--account {
  max-width: 400px;
}

.sm-auth-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sm-auth-modal__brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sm-auth-modal__logo {
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.sm-auth-modal__badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sm-auth-modal__close {
  background: transparent;
  border: none;
  color: #a89f92;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: color 0.15s;
}

.sm-auth-modal__close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Banner Contextual */
.sm-auth-context-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(229, 184, 34, 0.15) 0%, rgba(200, 16, 46, 0.12) 100%);
  border: 1px solid rgba(229, 184, 34, 0.35);
  font-size: 0.8rem;
  color: #ffe699;
  line-height: 1.4;
}

.sm-auth-context-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* Abas de Navegação */
.sm-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  background: #090706;
  padding: 0.3rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sm-auth-tab {
  padding: 0.65rem 0.5rem;
  border: none;
  background: transparent;
  color: #a89f92;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.sm-auth-tab.is-active {
  background: linear-gradient(135deg, #2a201b 0%, #1c1512 100%);
  color: #ffd700;
  border: 1px solid rgba(229, 184, 34, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Alertas de Erro / Sucesso */
.sm-auth-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}

.sm-auth-alert--error {
  background: rgba(200, 16, 46, 0.2);
  border: 1px solid #c8102e;
  color: #ff99aa;
}

.sm-auth-alert--success {
  background: rgba(46, 139, 87, 0.2);
  border: 1px solid #2e8b57;
  color: #88ffaa;
}

/* Formulários */
.sm-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sm-auth-form[hidden] {
  display: none !important;
}

.sm-auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
}

.sm-auth-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #d8cfc2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sm-auth-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: #090706;
  border: 1.5px solid rgba(229, 184, 34, 0.35);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.88rem;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.sm-auth-input:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(229, 184, 34, 0.3);
}

.sm-auth-hint {
  font-size: 0.7rem;
  color: #9c9284;
  line-height: 1.35;
}

.sm-auth-submit-btn {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #c8102e 0%, #8b0000 100%);
  border: 1.5px solid rgba(229, 184, 34, 0.5);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(200, 16, 46, 0.35);
  margin-top: 0.35rem;
}

.sm-auth-submit-btn:hover {
  background: linear-gradient(135deg, #e01438 0%, #a80000 100%);
  border-color: #ffd700;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229, 184, 34, 0.35);
}

.sm-auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.sm-auth-terms-note {
  font-size: 0.7rem;
  color: #8c8275;
  text-align: center;
  line-height: 1.35;
  margin: 0;
}

/* Painel de Perfil do Usuário */
.sm-account-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}

.sm-account-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8102e 0%, #110d0b 100%);
  border: 2px solid #ffd700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(229, 184, 34, 0.3);
}

.sm-account-avatar__letter {
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffd700;
}

.sm-account-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.sm-account-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(229, 184, 34, 0.15);
  border: 1px solid rgba(229, 184, 34, 0.4);
  color: #ffd700;
  font-size: 0.72rem;
  font-weight: 700;
}

.sm-account-info-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #090706;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.sm-account-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.sm-account-info-label {
  color: #a89f92;
}

.sm-account-info-val {
  color: #ffffff;
  font-weight: 600;
}

.sm-account-info-val--gold {
  color: #ffd700;
  font-weight: 800;
}

.sm-account-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.sm-account-cta-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #e5b822 0%, #c49615 100%);
  border: 1px solid #ffe270;
  color: #110d0b;
  font-weight: 800;
  font-size: 0.86rem;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.sm-account-cta-btn:hover {
  background: linear-gradient(135deg, #ffd700 0%, #dbab1c 100%);
  transform: translateY(-1px);
}

.sm-account-logout-btn {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #a89f92;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sm-account-logout-btn:hover {
  background: rgba(200, 16, 46, 0.15);
  border-color: #c8102e;
  color: #ff8899;
}

/* ===================================================================
   SOFT GATES INTELIGENTES (Abaixo da dobra com preservação SEO)
   =================================================================== */
.sm-soft-gate-wrapper {
  position: relative;
  width: 100%;
  margin-top: 1.5rem;
}

.sm-soft-gate-wrapper.is-unlocked .sm-soft-gate-overlay {
  display: none !important;
}

.sm-soft-gate-wrapper.is-unlocked .sm-soft-gate-content {
  filter: none !important;
  pointer-events: auto !important;
  user-select: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.sm-soft-gate-content {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
  max-height: 480px;
  overflow: hidden;
  transition: filter 0.3s ease;
}

.sm-soft-gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(14, 10, 9, 0.4) 0%, rgba(14, 10, 9, 0.92) 20%, #0e0a09 100%);
  box-sizing: border-box;
}

.sm-soft-gate-card {
  max-width: 480px;
  width: 100%;
  padding: 1.75rem 1.5rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #1f1814 0%, #110d0b 100%);
  border: 1.5px solid rgba(229, 184, 34, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(229, 184, 34, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.sm-soft-gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(229, 184, 34, 0.15);
  border: 1px solid rgba(229, 184, 34, 0.4);
  color: #ffd700;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sm-soft-gate-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.25;
}

.sm-soft-gate-desc {
  font-size: 0.84rem;
  color: #d8cfc2;
  line-height: 1.45;
  margin: 0;
}

.sm-soft-gate-desc strong {
  color: #ffd700;
}

.sm-soft-gate-btn {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #e5b822 0%, #c49615 100%);
  border: 1.5px solid #ffe270;
  color: #110d0b;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(229, 184, 34, 0.35);
  margin-top: 0.35rem;
}

.sm-soft-gate-btn:hover {
  background: linear-gradient(135deg, #ffd700 0%, #dbab1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(229, 184, 34, 0.5);
}

.sm-soft-gate-footer-note {
  font-size: 0.7rem;
  color: #9c9284;
}

/* Experimento EXP-PROP-01: Variante progressive_open (Zero CLS via atributo no <html>) */
html[data-ab-gate="progressive_open"] .sm-soft-gate-overlay {
  display: none !important;
}

html[data-ab-gate="progressive_open"] .sm-soft-gate-content {
  filter: none !important;
  pointer-events: auto !important;
  user-select: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.sm-progressive-invite-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0;
  padding: 1.1rem 1.35rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(140, 29, 36, 0.28) 0%, rgba(24, 19, 16, 0.96) 100%);
  border: 1.5px solid rgba(229, 184, 34, 0.45);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.sm-progressive-invite-banner__text {
  flex: 1 1 320px;
  font-size: 0.88rem;
  color: #f7eed8;
  line-height: 1.45;
}

.sm-progressive-invite-banner__text strong {
  color: #ffd700;
}

.sm-progressive-invite-btn {
  width: auto !important;
  margin-top: 0 !important;
  padding: 0.7rem 1.15rem !important;
  font-size: 0.84rem !important;
  white-space: nowrap;
}
