/* ===== OKPAGOS NEW LOGIN STYLES — REDESIGN 2026 ===== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: "Poppins", sans-serif;
  overflow: hidden;
}

button, input {
  font-family: inherit;
  font-size: inherit;
  background: none;
  color: inherit;
  border: none;
  outline: none;
}
button { cursor: pointer; }

/* ─── DESKTOP LAYOUT ─── */
.page {
  display: grid;
  grid-template-columns: 1fr 420px;
  height: 100vh;
  width: 100vw;
}

/* ── LEFT ── */
.left {
  position: relative;
  display: flex;
  align-items: center;
  padding: clamp(32px, 6vw, 80px);
  overflow: hidden;
  background: #0a1432;
}

.left-bg {
  position: absolute;
  inset: 0;
  background: url('../img/login/background.png') center/cover no-repeat;
  background-color: #0a1432;
}

.left-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(89deg, #FFF 24.61%, rgba(255, 255, 255, 0.50) 54.42%, rgba(255, 255, 255, 0.00) 75.47%);
}

.left-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 1;
}

.left-content {
  position: relative;
  z-index: 2;
}

.logo {
  margin-bottom: clamp(36px, 6vh, 64px);
}

.logo-ok-pagos {
  display: flex;
  max-width: 295px;
  width: 65%;
}

.icon-login {
  max-width: 88px;
}

.headline {
  font-family: "Poppins", sans-serif;
  font-size: clamp(30px, calc(30px + 18 * ((100vw - 412px) / 1100)), 48px);
  font-weight: 700;
  line-height: 1.25;
  color: #1B3E82;
  margin-bottom: clamp(22px, 4vh, 40px);
}

.headline em {
  color: #DE3544;
  font-style: normal;
}

.features {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8vh, 20px);
}

.feature {
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: translateX(-20px);
  animation: fadeInLeft .5s ease forwards;
}

.feature:nth-child(1) { animation-delay: .2s; }
.feature:nth-child(2) { animation-delay: .35s; }
.feature:nth-child(3) { animation-delay: .5s; }

@keyframes fadeInLeft {
  to { opacity: 1; transform: translateX(0); }
}

.feature-icon {
  width: clamp(42px, 4vw, 54px);
  height: clamp(42px, 4vw, 54px);
  flex-shrink: 0;
  background: rgba(255, 255, 255, .13);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon img {
  width: 95%;
  height: 95%;
  object-fit: contain;
}

.feature-text strong {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: clamp(19px, 1.3vw, 27px);
  font-weight: 700;
  color: #000;
}

.feature-text span {
  font-size: clamp(15px, 1vw, 20px);
  color: #000;
}

/* ── RIGHT ── */
.right {
  display: flex;
  align-items: center;
  justify-content: center;
  /*padding: 32px 28px;*/
  background: url('../img/login/background-formulario.png') center/cover no-repeat;
  position: relative;
  z-index: 3;
}

.card {
    background: #fff;
    border-radius: 20px;
    padding: clamp(28px, 4vh, 40px) clamp(14px, 2.5vw, 16px);
    /*max-width: 360px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);*/
    width: 100%;
    opacity: 0;
    animation: cardIn .55s .1s ease forwards;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.card-title {
  font-family: "Poppins", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #000;
  text-align: center;
  line-height: 1.4;
  margin-bottom: clamp(18px, 3vh, 28px);
}

/* ─── FORM ─── */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #000;
  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  padding: 10px 33px;
  border: 1.5px solid #D1D5DB;
  border-radius: 10px;
  font-size: 13.5px;
  font-family: "Poppins", sans-serif;
  color: #111827;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.form-group input::placeholder { color: #9CA3AF; }

.form-group input:focus {
  border-color: #1B3E82;
  box-shadow: 0 0 0 3px rgba(45, 77, 181, .15);
}

.form-group input.input-error {
  border-color: #DE3544 !important;
  box-shadow: 0 0 0 3px rgba(222, 53, 68, .12) !important;
}

.field-error {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  color: #DE3544;
  margin-top: 3px;
}

/* Password toggle */
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  right: 0;
  top: 0;
  height: 40px;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
  background: none;
  border: none;
  cursor: pointer;
  transition: color .2s;
}
.password-toggle:hover { color: #374151; }

/* Recover link */
.recover {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #1B3E82;
  font-weight: 500;
  margin-top: -4px;
  margin-bottom: 18px;
  text-decoration: none;
  transition: color .2s;
}
.recover:hover { color: #163172; text-decoration: underline; }

/* reCAPTCHA */
.new-login__captcha {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}




/* Submit button */
.btn-login {
  width: 100%;
  padding: 12px;
  background: #1B3E82;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.4);
  transition: background .2s, transform .15s;
  position: relative;
}
.btn-login:hover { background: #163172; }
.btn-login:active { transform: scale(.98); }
.btn-login:disabled { opacity: .7; cursor: not-allowed; }

.btn-login .spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn-login.loading .btn-text { display: none; }
.btn-login.loading .spinner { display: block; }

/* Error / Alert messages */
.error-msg {
  display: none;
  color: #DE3544;
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
}
.error-msg.visible { display: block; }

.alert {
  display: none;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  line-height: 18px;
}
.alert.active { display: block; }
.alert--error {
  background-color: #FFF0F4;
  color: #B11E47;
  border: 1px solid #DE3544;
}

/* ─── LOADING OVERLAY ─── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
.loading-overlay.active { display: flex; }
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ─── NOTIFICATION SYSTEM ─── */
#notification {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  width: 90%;
  max-width: 500px;
}

#divAlert {
  padding: 12px 16px;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  position: relative;
}

#divAlert .close {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  opacity: 0.6;
  cursor: pointer;
}
#divAlert .close:hover { opacity: 1; }
#divAlert p { margin: 0; padding-right: 24px; }

.notification.alert-success {
  background-color: #E0FBFD;
  color: #137F82;
  border: 1px solid #1AAAAD;
}
.notification.alert-danger {
  background-color: #FFF0F4;
  color: #B11E47;
  border: 1px solid #DE3544;
}
.notification.alert-warning {
  background-color: #FFF8E1;
  color: #B45309;
  border: 1px solid #FECF2F;
}
.notification.alert-info {
  background-color: #D8EBFF;
  color: #023F80;
  border: 1px solid #479EF8;
}

@keyframes fadeInNotification {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOutNotification {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}
.fadeIn-notification  { animation: fadeInNotification .3s ease forwards; }
.fadeInOut-notification { animation: fadeInNotification .3s ease forwards, fadeOutNotification .5s ease 4.5s forwards; }

/* ═══════════════════════════════════════════════════
   MOBILE BUTTON + OVERLAY
   ═══════════════════════════════════════════════════ */
.mobile-btn-wrap {
  display: none;
}

.mobile-login-overlay {
  display: none;
}

.overlay-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 34px;
  height: 34px;
  border: none;
  background: #f0f2f7;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 767px) {
  html, body {
    overflow: auto !important; /* permite que el popup no quede recortado */
  }

  /* selector amplio para el contenedor que Google inyecta — se refuerzan reglas */
  body > div[style*="position: absolute"] {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    -webkit-transform: translate(-50%, -50%) !important;
    transform-origin: center center !important;
    -webkit-transform-origin: center center !important;
    z-index: 2147483647 !important; /* muy alto para evitar solapamientos */
    max-width: 92vw !important;
    width: auto !important;
    box-sizing: border-box !important;
  }

  body > div[style*="position: absolute"] iframe {
    max-width: 100% !important;
    width: 100% !important;
  }

  .page {
    display: block;
    height: 100vh;
    position: relative;
  }

  .logo-ok-pagos {
    max-width: 100%;
  }

  .left {
    height: 100vh;
    padding: 36px 28px 110px;
    align-items: flex-start;
  }

  .left-bg {
    position: absolute;
    inset: 0;
    background: url('../img/login/background-formulario.png') center/cover no-repeat;
  }

  .right {
    display: none;
  }

  .icon-login {
    max-width: 90px;
  }

  .feature-icon img {
    width: 125%;
    height: 125%;
    object-fit: contain;
  }

  .feature { gap: 19px; }

  /* Mobile bottom button */
  .mobile-btn-wrap {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 28px 36px;
    z-index: 10;
  }

  .btn-mobile-ingresar {
    width: 100%;
    padding: 15px;
    background: #1B3E82;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.4);
  }
  .btn-mobile-ingresar:active { transform: scale(.98); }

  /* Overlay */
  .mobile-login-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
  }

  .mobile-login-overlay .overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    transition: opacity .4s ease;
  }

  .mobile-login-overlay .overlay-card {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: #fff;
    border-radius: 20px 0 0 20px;
    padding: 48px 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    transform: translateX(105%);
    transition: transform .42s cubic-bezier(.4, 0, .2, 1);
  }

  .mobile-login-overlay.open {
    pointer-events: all;
  }

  .mobile-login-overlay.open .overlay-backdrop {
    opacity: 1;
  }

  .mobile-login-overlay.open .overlay-card {
    transform: translateX(0);
  }

  .mobile-login-overlay.open .right {
    display: flex !important;
    width: 100%;
    height: 100%;
    background: #fff;
    padding: 20px 20px 32px;
    border-radius: 0;
  }

  .mobile-login-overlay.open .card {
    max-width: 100%;
  }

  .card {
    background: #fff;
    border-radius: 20px;
    padding: clamp(28px, 4vh, 40px) clamp(24px, 2.5vw, 36px);
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  }
}
@media screen and (max-width: 575px) {
    .g-recaptcha {
        transform: scale(0.85);
        -webkit-transform: scale(0.85);
        transform-origin: 0 0;
        -webkit-transform-origin: 0 0;
    }
}