/**
 * Modal de login in-page na shell GoCore (platform.php, contacto, etc.)
 * — overlay semi-transparente como no Horizon; sem dependência de checkinall-home.css
 */

body.gocore-shell-login-open {
  overflow: hidden;
}

.gocore-shell-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

body.gocore-shell-login-open .gocore-shell-login-overlay {
  opacity: 1;
  visibility: visible;
}

.gocore-shell-login-box {
  position: relative;
  z-index: 10151;
  flex: 0 0 auto;
  margin: auto;
  width: min(100%, 520px);
  max-width: min(560px, calc(100dvw - 2rem));
  max-height: min(90vh, calc(100dvh - 2rem));
  overflow: auto;
  box-sizing: border-box;
  background: var(--gocore-color-surface, #fff);
  border: 1px solid var(--gocore-color-border, #e5e7eb);
  border-radius: var(--gocore-radius-md, 18px);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

body.gocore-shell-login-open .gocore-shell-login-box {
  opacity: 1;
  transform: scale(1);
}

.gocore-shell-login-box .gocore-shell-login-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  color: var(--gocore-color-text-muted, #64748b);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}

.gocore-shell-login-box .gocore-shell-login-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--gocore-color-text, #222);
}

.gocore-shell-login-box .gocore-shell-login-inner {
  padding: 1.75rem 1.5rem 1.5rem;
}

.gocore-shell-login-box .gocore-shell-login-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.5rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--gocore-color-text, #17324d);
}

.gocore-shell-login-box .gocore-shell-login-brand-mark {
  display: inline-flex;
  width: 0.45rem;
  height: 1.35rem;
  background: var(--primary, #1e5eff);
  border-radius: 3px;
  box-shadow: 0.45rem 0 0 0 var(--primary, #1e5eff);
}

.gocore-shell-login-box .gocore-shell-login-sub {
  text-align: center;
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
  color: var(--gocore-color-text-muted, #62768c);
}

.gocore-shell-login-box label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: var(--gocore-color-text, #17324d);
}

.gocore-shell-login-box input[type='email'],
.gocore-shell-login-box input[type='password'] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--gocore-color-border, #e5e7eb);
  border-radius: 10px;
  font-size: 1rem;
  box-sizing: border-box;
  margin-bottom: 0.85rem;
}

.gocore-shell-login-box input:focus {
  outline: 2px solid rgba(30, 94, 255, 0.35);
  outline-offset: 1px;
}

.gocore-shell-login-box .gocore-shell-login-pw-wrap {
  position: relative;
  margin-bottom: 0.85rem;
}

.gocore-shell-login-box .gocore-shell-login-pw-wrap input {
  margin-bottom: 0;
  padding-right: 2.75rem;
}

.gocore-shell-login-box .gocore-shell-login-pw-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.35rem;
  font-size: 1rem;
  line-height: 1;
}

.gocore-shell-login-box .gocore-shell-login-remember {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.gocore-shell-login-box .gocore-shell-login-remember input {
  margin: 0;
}

.gocore-shell-login-box .gocore-shell-login-submit {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  background: linear-gradient(135deg, #e61e4d, #e43a6e);
  color: #fff;
}

.gocore-shell-login-box .gocore-shell-login-submit:hover {
  filter: brightness(1.04);
}

.gocore-shell-login-box .gocore-shell-login-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.gocore-shell-login-box .gocore-shell-login-msg {
  display: none;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}

.gocore-shell-login-box .gocore-shell-login-msg.is-visible {
  display: block;
}

.gocore-shell-login-box .gocore-shell-login-msg--err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.gocore-shell-login-box .gocore-shell-login-links {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.gocore-shell-login-box .gocore-shell-login-links a {
  color: #e61e4d;
  font-weight: 600;
  text-decoration: none;
  margin: 0 0.35rem;
}

.gocore-shell-login-box .gocore-shell-login-links a:hover {
  text-decoration: underline;
}
