/* K17 · Sign-in screen (ported from stock S01 §13). Also used by My account (K19). */
.wkit-gate [hidden],
.wkit-account [hidden] { display: none !important; }

/* --- 13. PANTALLA DE ACCESO (S23 / S24) --- */
body.wkit-gate-body {
  margin: 0;
  background: #ffffff;
}
.wkit-gate {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  min-height: 100vh;
  min-height: 100dvh;
  color: #0f172a;
}

/* Columna de imagen: velo oscuro para que el texto blanco siempre se lea */
.wkit-gate-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 56px 56px 56px;
  color: #ffffff;
  background-color: #12361f;
  background-image: var(--wkit-gate-bg, linear-gradient(160deg, #1E7633 0%, #0b2414 100%));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.wkit-gate-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 30, 16, 0.30) 0%, rgba(8, 30, 16, 0.55) 55%, rgba(8, 30, 16, 0.88) 100%);
}
.wkit-gate-hero {
  position: relative;
  z-index: 1;
  max-width: 100%;
  text-align: left;
}

/* Escritorio: la imagen queda fija a la altura de la ventana; solo el panel blanco se desplaza */
@media (min-width: 901px) {
  .wkit-gate {
    align-items: start;
  }
  .wkit-gate-visual {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
  }
  .wkit-gate-panel {
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
  }
}

/* Logo sobre el formulario, al ancho de la tarjeta (se oculta en Request access) */
.wkit-gate-brand {
  margin: 0 0 120px 0;
}
.wkit-gate[data-view="request"] .wkit-gate-brand {
  display: none;
}
.wkit-gate-logo {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}
.wkit-gate-sitename {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
}
.wkit-gate-headline {
  font-size: clamp(34px, 4.4vw, 60px) !important;
  font-weight: 700 !important;
  line-height: 1.04 !important;
  letter-spacing: -0.02em;
  color: #ffffff !important;
  max-width: 13ch;
  margin: 0 0 16px 0 !important;
}
.wkit-gate-intro {
  font-size: 18px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
  max-width: 40ch;
  margin: 0;
}

/* Columna del formulario */
.wkit-gate-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #ffffff;
}
.wkit-gate-card {
  width: 100%;
  max-width: 400px;
}
.wkit-gate-badge {
  display: inline-block;
  font-size: 13px;
  line-height: 1.4;
  color: #92400e;
  background: #fef3c7;
  border-radius: 6px;
  padding: 6px 10px;
  margin: 0 0 16px 0;
}
.wkit-gate-context {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #0f172a;
  border-left: 3px solid #1E7633;
  padding: 2px 0 2px 12px;
  margin: 0 0 22px 0;
}

/* Pestañas */
.wkit-gate-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid #e2e8f0;
  margin: 0 0 24px 0;
}
.wkit-gate-tab {
  appearance: none;
  background: transparent !important;
  color: #64748b !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 0 12px 0 !important;
  margin: 0 0 -1px 0 !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  cursor: pointer;
}
.wkit-gate-tab:hover {
  color: #0f172a !important;
}
.wkit-gate-tab[aria-selected="true"] {
  color: #0f172a !important;
  border-bottom-color: #1E7633 !important;
}
.wkit-gate-tab:focus-visible {
  outline: 3px solid rgba(30, 118, 51, 0.4);
  outline-offset: 4px;
}

/* Formularios */
.wkit-gate-form {
  margin: 0;
}
.wkit-gate-title {
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #0f172a !important;
  margin: 0 0 6px 0 !important;
}
.wkit-gate-help {
  font-size: 14px;
  line-height: 1.5;
  color: #64748b;
  margin: 0 0 20px 0;
}
.wkit-gate-field {
  margin: 0 0 16px 0;
}
.wkit-gate-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.wkit-gate-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 6px 0;
}
.wkit-gate-optional {
  font-weight: 400;
  color: #64748b;
}
.wkit-gate-input {
  display: block;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 11px 12px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
}
.wkit-gate-input:focus {
  border-color: #1E7633 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(30, 118, 51, 0.15) !important;
}
.wkit-gate-textarea {
  min-height: 88px;
  resize: vertical;
}
.wkit-gate-hint {
  font-size: 13px;
  color: #64748b;
  margin: -8px 0 16px 0;
}

/* Contraseña con botón "Show" dentro del campo */
.wkit-gate-password {
  position: relative;
}
.wkit-gate-password .wkit-gate-input {
  padding-right: 72px !important;
}
.wkit-gate-reveal {
  position: absolute !important;
  top: 50% !important;
  right: 6px !important;
  transform: translateY(-50%);
  background: transparent !important;
  color: #1E7633 !important;
  border: 0 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  padding: 6px 8px !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  cursor: pointer;
}
.wkit-gate-reveal:hover {
  background: #f0fdf4 !important;
}
.wkit-gate-reveal:focus-visible {
  outline: 3px solid rgba(30, 118, 51, 0.4);
  outline-offset: 1px;
}

/* Casilla "Keep me signed in" */
.wkit-gate-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #334155;
  margin: 0 0 18px 0;
  cursor: pointer;
}
.wkit-gate-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #1E7633;
  cursor: pointer;
}

/* ⓘ de "Referred by": la burbuja se alinea con la fila de la etiqueta */
.wkit-gate-label-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px 0;
}
.wkit-gate-label-row .wkit-gate-label {
  margin: 0;
}
.wkit-gate-info-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  color: #64748b !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  cursor: pointer;
}
.wkit-gate-info-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.wkit-gate-info-btn:hover,
.wkit-gate-info.is-open .wkit-gate-info-btn {
  color: #1E7633 !important;
}
.wkit-gate-info-btn:focus-visible {
  outline: 3px solid rgba(30, 118, 51, 0.4);
  outline-offset: 1px;
}
.wkit-gate-tip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: min(320px, 100%);
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  pointer-events: none;
}
.wkit-gate-info:focus-within .wkit-gate-tip,
.wkit-gate-info.is-open .wkit-gate-tip {
  opacity: 1;
  visibility: visible;
  transform: none;
}
@media (hover: hover) {
  .wkit-gate-info:hover .wkit-gate-tip {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

/* Campo trampa antispam (invisible) */
.wkit-gate-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Mensajes */
.wkit-gate-status {
  font-size: 14px;
  line-height: 1.4;
  color: #475569;
  margin: 0 0 14px 0;
}
.wkit-gate-status:empty {
  display: none;
}
.wkit-gate-status.is-error {
  color: #b91c1c;
}

/* Botón principal y enlaces de texto */
.wkit-gate-submit {
  display: block !important;
  width: 100% !important;
  padding: 12px 18px !important;
  margin: 0 !important;
  background: #1E7633 !important;
  color: #ffffff !important;
  border: 1px solid #1E7633 !important;
  border-radius: 8px !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
  box-shadow: none !important;
}
.wkit-gate-submit:hover {
  background: #155424 !important;
}
.wkit-gate-submit:disabled {
  opacity: 0.6;
  cursor: default !important;
}
.wkit-gate-submit:focus-visible {
  outline: 3px solid rgba(30, 118, 51, 0.4) !important;
  outline-offset: 2px !important;
}
.wkit-gate-link {
  display: block !important;
  margin: 16px auto 0 auto !important;
  padding: 4px 6px !important;
  background: transparent !important;
  color: #1E7633 !important;
  border: 0 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  cursor: pointer;
}
.wkit-gate-link:hover {
  text-decoration: underline;
}
.wkit-gate-link:focus-visible {
  outline: 3px solid rgba(30, 118, 51, 0.4);
  outline-offset: 2px;
}

/* Confirmación (solicitud enviada, correo enviado) */
.wkit-gate-done {
  text-align: center;
  padding: 16px 0 0 0;
  outline: none;
}
.wkit-gate-done-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background: #dcfce7;
  color: #1E7633;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wkit-gate-done-icon svg {
  display: block;
  width: 28px;
  height: 28px;
}
.wkit-gate-done-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
}
.wkit-gate-done-text {
  font-size: 15px;
  line-height: 1.5;
  color: #64748b;
  margin: 0;
}

/* Tablet y móvil: una columna, la imagen como franja superior */
@media (max-width: 900px) {
  .wkit-gate {
    grid-template-columns: 1fr;
  }
  .wkit-gate-visual {
    min-height: 240px;
    padding: 24px 24px 32px 24px;
  }
  .wkit-gate-brand {
    margin-bottom: 40px;
  }
  .wkit-gate-logo {
    max-width: 240px !important;
  }
  .wkit-gate-headline {
    font-size: 34px !important;
    margin-bottom: 8px !important;
  }
  .wkit-gate-intro {
    font-size: 16px;
  }
  .wkit-gate-panel {
    align-items: flex-start;
    padding: 32px 20px 48px 20px;
  }
}
@media (max-width: 480px) {
  .wkit-gate-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}


/* No access (403) */
.wkit-denied {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: #efefef;
  color: #0f172a;
}
.wkit-denied-card {
  width: 100%;
  max-width: 440px;
  padding: 32px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-sizing: border-box;
}
.wkit-denied-title { margin: 0 0 12px; font-size: 24px; line-height: 1.2; font-weight: 700; color: #0f172a; }
.wkit-denied-text { margin: 0 0 20px; color: #475569; }
a.wkit-denied-home { display: inline-block; box-sizing: border-box !important; text-decoration: none; text-align: center; }

/* K24 · language selector on the sign-in screen */
.wkit-gate {
  position: relative;
}
.wkit-gate-lang {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
}
@media (max-width: 900px) {
  .wkit-gate-lang .wkit-lang-btn {
    color: #ffffff;
  }
  .wkit-gate-lang .wkit-lang-btn:hover,
  .wkit-gate-lang .wkit-lang-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
  }
}
