/* Registro de cuenta comercial NIC.ec
   Spec: Crear cuenta documentado v1.0 (7 ago 2026)
   Cupón autom. 5% — a implementar al final */

@font-face {
  font-family: "Times New Roman Canva";
  src: url("../fonts/TimesNewRoman-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Hoves";
  src: url("../fonts/TTHoves-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Hoves";
  src: url("../fonts/TTHoves-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Touvlo";
  src: url("../fonts/Touvlo-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Logo script Canva (sitio crear-cuenta) */
@font-face {
  font-family: "Blishfully Script";
  src: url("../fonts/BlishfullyScript-Regular.woff") format("woff"),
    url("../fonts/BlishfullyScript-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html.reg-nic-cuenta {
  /* Fondo general — #FFFFFF */
  background: #ffffff !important;
  color: #051d40;
  overflow-x: hidden !important;
}

html.reg-nic-cuenta body,
html.reg-nic-cuenta section#main-body {
  background: #ffffff !important;
  color: #051d40;
  overflow: visible !important;
}

html.reg-nic-cuenta section#main-body {
  padding: 0 !important;
  margin: 0 !important;
}

html.reg-nic-cuenta section#main-body > .container,
html.reg-nic-cuenta section#main-body .row,
html.reg-nic-cuenta section#main-body .col-12,
html.reg-nic-cuenta .primary-content {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

html.reg-nic-cuenta section,
html.reg-nic-cuenta .nr-page,
html.reg-nic-cuenta .primary-content {
  overflow: visible !important;
  max-height: none !important;
}

/* Ocultar OAuth / Google en registro comercial */
html.reg-nic-cuenta .providerPreLinking,
html.reg-nic-cuenta .social-signin-btns,
html.reg-nic-cuenta #providerLinkingMessages,
html.reg-nic-cuenta .providerLinkingFeedback,
html.reg-nic-cuenta [id*="g_id"],
html.reg-nic-cuenta iframe[src*="accounts.google"],
html.reg-nic-cuenta .btn-google,
html.reg-nic-cuenta .btn-social {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.nr-page {
  /* Palette v1.0 */
  --nr-navy: #051d40;
  --nr-photo-bg: #7892a2;
  --nr-input: #acaeae;
  --nr-input-text: #ffffff;
  --nr-orange: #ff751f;
  --nr-orange-hover: #e86814;
  --nr-logo-blue: #0b50cb;
  --nr-logo-violet: #6711a4;
  --nr-serif: "Times New Roman Canva", "Times New Roman", Times, Georgia, serif;
  --nr-body: "TT Hoves", "Segoe UI", Arial, sans-serif;
  --nr-cta: "Touvlo", "TT Hoves", Arial, sans-serif;
  --nr-script: "Blishfully Script", "Great Vibes", cursive;

  box-sizing: border-box;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.75rem, 4.5vw, 3.25rem) clamp(1.15rem, 4vw, 2.75rem) clamp(2.5rem, 6vw, 4rem);
  background: #ffffff;
  color: var(--nr-navy);
  font-family: var(--nr-body);
}

.nr-page *,
.nr-page *::before,
.nr-page *::after {
  box-sizing: border-box;
}

.nr-page .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* —— Card única: foto + formulario —— */
.nr-card {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid rgba(5, 29, 64, 0.08);
  border-radius: 0;
  box-shadow:
    0 1px 2px rgba(5, 29, 64, 0.04),
    0 18px 48px rgba(5, 29, 64, 0.1);
  overflow: hidden;
}

.nr-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: min(72vh, 36rem);
}

/* Panel fotográfico #7892A2 + foto con recorte Canva */
.nr-photo {
  position: relative;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
  background: var(--nr-photo-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Marco azul-grisáceo visible alrededor del recorte */
  padding: 1.85rem 1.35rem 1.85rem 1.85rem;
  overflow: hidden;
}

.nr-photo-clip-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.nr-photo-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  clip-path: url(#nr-photo-clip);
  -webkit-clip-path: url(#nr-photo-clip);
  /* Fallback si el clip SVG no aplica */
  border-radius: 1.65rem 1.65rem 1.65rem 0.35rem;
}

.nr-photo-frame img,
.nr-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center 28%;
}

/* Panel derecho del formulario */
.nr-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: clamp(1.5rem, 3.5vw, 2.5rem) clamp(1.35rem, 3.2vw, 2.35rem);
  background: #ffffff;
  box-sizing: border-box;
}

.nr-panel .nr-form {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Título 31px Times New Roman MT Bold #051D40 */
.nr-title {
  margin: 0 0 0.35rem;
  font-family: var(--nr-serif);
  font-weight: 700;
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--nr-navy);
}

/* Subtítulo 20px TT Hoves Italic #051D40 */
.nr-subtitle {
  margin: 0 0 1.35rem;
  font-family: var(--nr-body);
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
  color: var(--nr-navy);
}

/* Mensajes (errores WHMCS) — armonía con paleta Create Account */
.nr-alert {
  margin: 0 0 1.15rem;
}

.nr-alert .alert,
.nr-alert .alert-danger,
.nr-alert .alert-error,
.nr-alert .alert-warning,
.nr-alert .alert-success,
.nr-alert .alert-info {
  margin: 0 !important;
  padding: 0.9rem 1.15rem 0.95rem !important;
  border: 0 !important;
  border-left: 3px solid var(--nr-orange) !important;
  border-radius: 0 !important;
  background: #f4f6f9 !important;
  color: var(--nr-navy) !important;
  font-family: var(--nr-body) !important;
  font-size: 12px !important;
  font-style: italic !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.nr-alert .alert::before,
.nr-alert .alert::after {
  display: none !important;
  content: none !important;
}

.nr-alert .alert strong,
.nr-alert .alert b,
.nr-alert .alert .alert-heading {
  display: block;
  margin: 0 0 0.35rem;
  font-family: var(--nr-body);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  color: var(--nr-navy);
  letter-spacing: 0.01em;
}

.nr-alert .alert ul,
.nr-alert .alert ol {
  margin: 0.25rem 0 0 !important;
  padding: 0 0 0 1.05rem !important;
  list-style: disc;
}

.nr-alert .alert li {
  margin: 0.15rem 0;
  padding: 0;
  color: var(--nr-navy);
  font-style: italic;
}

.nr-alert .alert a {
  color: var(--nr-logo-blue);
  font-weight: 600;
  font-style: normal;
  text-decoration: none;
}

.nr-alert .alert a:hover {
  text-decoration: underline;
}

.nr-alert .alert > p {
  margin: 0;
}

.nr-alert .alert [class*="fa-"],
.nr-alert .alert .fas,
.nr-alert .alert .far,
.nr-alert .alert .svg-inline--fa {
  display: none !important;
}

.nr-form {
  width: 100%;
}

.nr-field {
  margin: 0 0 0.85rem;
}

.nr-field--row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 0 0 0.25rem;
}

.nr-field--row + .nr-hint {
  margin-top: 0.1rem;
  margin-bottom: 0.85rem;
}

.nr-label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--nr-navy);
}

/* Campos: gris #ACAEAE · textos 20px Touvlo #FFFFFF */
.nr-input {
  display: block;
  width: 100%;
  height: 3.25rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--nr-input);
  color: var(--nr-input-text);
  font-family: var(--nr-cta);
  font-size: 20px;
  font-weight: 400;
  text-align: center;
  outline: none;
  transition: box-shadow 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.nr-input::placeholder {
  color: rgba(255, 255, 255, 0.95);
  opacity: 1;
  font-family: var(--nr-cta);
  font-size: 20px;
  text-align: center;
}

.nr-input:focus {
  box-shadow: 0 0 0 3px rgba(255, 117, 31, 0.4);
  background: #a0a2a2;
}

/* Chrome/Safari/Edge: autofill no debe cambiar fondo ni color del texto */
.nr-input:-webkit-autofill,
.nr-input:-webkit-autofill:hover,
.nr-input:-webkit-autofill:focus,
.nr-input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  font-family: var(--nr-cta);
  font-size: 20px;
  /* truco: sombra interna = mismo gris de campo */
  box-shadow: 0 0 0 1000px var(--nr-input) inset !important;
  transition: background-color 99999s ease-out;
  border: 0 !important;
}

.nr-input:-webkit-autofill:focus {
  box-shadow:
    0 0 0 1000px #a0a2a2 inset,
    0 0 0 3px rgba(255, 117, 31, 0.4) !important;
}

.nr-input-wrap {
  position: relative;
}

.nr-input-wrap .nr-input {
  padding-right: 2.85rem;
}

.nr-eye {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.nr-eye:hover {
  color: #fff;
}

/* Ayudas de campo y mensaje final: 12px TT Hoves Italic #051D40 */
.nr-hint {
  margin: 0.35rem 0 0;
  padding: 0 0.35rem;
  font-family: var(--nr-body);
  font-size: 12px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  color: var(--nr-navy);
}

.nr-pw-reqs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 0.45rem 0 0;
  padding: 0 0.25rem;
}

.nr-pw-req {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--nr-body);
  font-size: 12px;
  font-style: italic;
  color: #94a3b8;
}

.nr-pw-req svg {
  width: 0.85rem;
  height: 0.85rem;
  stroke: currentColor;
  flex-shrink: 0;
}

.nr-pw-req.is-ok {
  color: #16a34a;
}

.nr-field-error {
  margin: 0.35rem 0 0;
  padding: 0 0.35rem;
  font-size: 12px;
  font-style: italic;
  color: #ef4444;
}

.nr-match-msg {
  margin: 0.35rem 0 0;
  padding: 0 0.35rem;
  font-size: 12px;
  font-style: italic;
  min-height: 1.1em;
}

.nr-match-msg.is-ok {
  color: #16a34a;
}

.nr-match-msg.is-bad {
  color: #ef4444;
}

.nr-captcha {
  margin: 0.5rem 0 1rem;
}

.nr-captcha .captcha-container,
.nr-captcha .default-captcha,
.nr-captcha #google-recaptcha-domainchecker {
  margin: 0.5rem 0;
}

.nr-actions {
  display: flex;
  justify-content: center;
  margin: 0.35rem 0 0.95rem;
}

/* Botón #FF751F · texto 20px Touvlo #FFFFFF */
.nr-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 16.5rem);
  height: 3.25rem;
  padding: 0 2rem;
  border: 0;
  border-radius: 999px;
  background: var(--nr-orange);
  color: #ffffff !important;
  font-family: var(--nr-cta);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
}

.nr-submit:hover:not(:disabled) {
  background: var(--nr-orange-hover);
  transform: translateY(-1px);
}

.nr-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Mensaje final · TT Hoves Italic #051D40 */
.nr-promo {
  margin: 0 auto 1rem;
  max-width: 26rem;
  text-align: center;
  font-family: var(--nr-body);
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  color: var(--nr-navy);
}

.nr-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.nr-login-link {
  font-family: var(--nr-body);
  font-size: 12px;
  font-style: italic;
  color: var(--nr-navy);
  text-decoration: none;
}

.nr-login-link a {
  color: var(--nr-logo-blue);
  font-weight: 600;
  font-style: normal;
  text-decoration: none;
}

.nr-login-link a:hover {
  text-decoration: underline;
}

/* Logotipo script — tipografía Blishfully Script (Canva), nítida */
.nr-logo {
  margin-left: auto;
  margin-right: 0;
  line-height: 1;
  user-select: none;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  font-family: var(--nr-script);
  font-size: 68px;
  font-weight: 400;
  color: var(--nr-logo-blue);
  letter-spacing: 0.01em;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.nr-logo-nic {
  color: var(--nr-logo-blue);
}

.nr-logo-ec {
  color: var(--nr-logo-blue);
}

/* Motion */
html.reg-nic-cuenta .nr-page--motion .nr-card {
  animation: nr-fade-up 0.55s ease both;
}

@keyframes nr-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .nr-card {
    border-radius: 0;
  }

  .nr-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .nr-photo {
    max-width: none;
    margin: 0;
    max-height: 16rem;
    min-height: 12rem;
    aspect-ratio: 16 / 10;
    padding: 1.1rem 1.1rem 1.1rem 1.1rem;
  }

  .nr-photo-frame {
    border-radius: 1.25rem 1.25rem 1.25rem 0.3rem;
  }

  .nr-photo-frame img,
  .nr-photo img {
    min-height: 0;
    max-height: none;
  }

  .nr-panel {
    padding: 1.35rem 1.15rem 1.5rem;
  }

  .nr-title {
    text-align: center;
    font-size: clamp(1.45rem, 6vw, 31px);
  }

  .nr-subtitle {
    text-align: center;
    font-size: clamp(1rem, 4vw, 20px);
  }

  .nr-input,
  .nr-input::placeholder,
  .nr-submit {
    font-size: clamp(0.95rem, 3.8vw, 20px);
  }

  .nr-field--row {
    grid-template-columns: 1fr;
  }

  .nr-logo {
    font-size: clamp(48px, 14vw, 68px);
  }
}

@media (max-width: 480px) {
  .nr-page {
    padding: 1.1rem 0.9rem 2.25rem;
  }

  .nr-input {
    height: 2.95rem;
  }

  .nr-submit {
    width: 100%;
    min-width: 0;
  }

  .nr-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .nr-logo {
    margin: 0.35rem 0 0 auto;
    align-self: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.reg-nic-cuenta .nr-page--motion .nr-card {
    animation: none;
  }
}
