html,
body {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Helvetica";
  overflow: hidden;
  color: #fff;
}

* {
  box-sizing: border-box;
  outline: none;
  border-radius: 5px;
}

/* disable image draggin */
img {
  pointer-events: none;
}

/* disable text selection */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.top-navbar {
  position: fixed;
  top: 0;
  width: 100vw;
  height: 45px;
  line-height: 45px;
  text-align: center;
  background: #cb0707;
  border-bottom: solid 1px #fff;
  font-size: 17.5px;
  z-index: 999;
}

.main {
  background: rgb(0, 0, 51);
  background: linear-gradient(
    25deg,
    rgba(0, 0, 51, 1) 0%,
    rgba(9, 9, 121, 1) 33%,
    rgba(211, 0, 0, 1) 100%
  );
}

.auth-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
}

.auth-wrapper.logo-only {
  justify-content: flex-start;
  padding-top: 120px;
  min-height: 520px;
}

#login {
  width: 100%;
  padding: 60px 30px 32px;
  background: #00008050;
  box-shadow: 10px 10px 30px #00000050;
  border-radius: 15px;
  font-size: 12px;
  display: none;
  position: relative;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

#login.login-visible {
  display: flex;
}

.login-header {
  text-align: center;
}

.login-header h2 {
  margin: 0 0 6px;
  font-size: 1.8rem;
}

.login-header p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.email-form input,
.email-form .password-field {
  margin-top: 0;
}

/* Status message styles */
.auth-status {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  transition: all 0.3s ease;
  display: none;
  z-index: 1000; /* Ensure it stays above other elements */
  box-sizing: border-box; /* Prevent padding from affecting width */
}

.auth-info {
  background-color: rgba(33, 150, 243, 0.3);
  border: 1px solid rgba(33, 150, 243, 0.5);
}

.auth-success {
  background-color: rgba(76, 175, 80, 0.3);
  border: 1px solid rgba(76, 175, 80, 0.5);
}

.auth-error {
  background-color: rgba(244, 67, 54, 0.3);
  border: 1px solid rgba(244, 67, 54, 0.5);
}

input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14.5px;
  border: none;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.email-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

button {
  width: 100%;
  padding: 10px;
  margin-top: 20px;
  margin-bottom: 2.5px;
  border: none;
  color: white;
  font-size: 14.5px;
  font-weight: bold;
  cursor: pointer;
  background-color: rgba(6, 0, 91, 0.9);
  border: 1px solid #ffffff;
}

.logo {
  position: relative;
  width: 100px;
  height: 100px;
  min-width: 100px;
  background-color: #fff;
  background-image: url(../images/inglesuniversal_512x512.webp);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 40px #00000090;
  z-index: 99;
  margin-bottom: -72px;
  align-self: center;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-wrapper.logo-only .logo {
  margin-bottom: 0;
}

.logo img {
  display: none;
}

.logo.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  margin: 0;
  padding-right: 58px;
}

.password-toggle {
  position: absolute;
  top: 12px;
  right: 0;
  bottom: 0;
  transform: none;
  width: auto;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  margin: 0;
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.password-visible .icon-eye {
  display: none;
}

.password-toggle.password-visible .icon-eye-off {
  display: block;
}

.email-submit {
  margin-top: 10px;
  border-radius: 25px;
  background: #cb0707;
  border: none;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.email-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.social-login {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-login .btn {
  margin-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ripple effect */
.ripple {
  background-position: center;
  transition: background 0.8s;
}
.ripple:hover {
  background: navy radial-gradient(circle, transparent 1%, navy 1%)
    center/15000%;
}
.ripple:active {
  background-color: rgba(255, 255, 255, 0.5);
  background-size: 100%;
  transition: background 0s;
}

.remember-me-wrapper {
  float: left;
  margin-top: 20px;
  margin-left: 1px;
}

.remember-me-wrapper span {
  margin-left: 3px;
}

.password-wrapper {
  display: flex;
  align-items: center;
  justify-content: unset;
  width: 100%;
  height: 35.45px;
}

.password-viewer {
  background-image: url(../icons/eye-off-outline.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px;
  margin-top: 25.3px;
  margin-left: -10px;
  width: 40px;
  height: 36.6px;
  background-color: #fff;
  cursor: pointer;
}

input[type="email"] {
  margin-top: 0px;
}

input[type="password"],
input[type="text"] {
  margin-top: 12px;
}

input[type="checkbox"] {
  display: inline-block;
  margin: 0;
  width: auto;
  vertical-align: middle;
}

.forgot-password {
  float: right;
  margin-top: 20px;
  margin-right: 1px;
  width: auto;
  cursor: pointer;
}

.or-divider {
  width: 100%;
  height: 1px;
  background: #555;
  margin: 24px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 32px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: normal;
  cursor: pointer;
  background: #fff;
  color: #000;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn svg {
  position: static;
  flex-shrink: 0;
}

.btn-apple svg {
  margin-left: -20px;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Disabled button state */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Version info styling */
.version-info {
  text-align: center;
  margin-top: 15px;
}

.version-info h5 {
  margin: 5px 0;
  font-size: 12px;
  font-weight: normal;
}

.version-number {
  font-size: 10px;
  margin: 0;
  opacity: 0.7;
}

/* Loading spinner animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #000;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  visibility: hidden;
}

.btn.loading .btn-spinner {
  visibility: visible;
}

/* Animation for the status message */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-status {
  animation: fadeIn 0.3s ease forwards;
}

/* Media queries for responsiveness */
@media (max-width: 350px) {
  #login {
    width: 280px;
    padding: 15px;
  }

  .btn {
    font-size: 0.9rem;
  }

  .btn svg {
    left: 15px;
  }
}

@media (max-height: 600px) {
  .logo {
    top: calc(100% / 2 - 180px);
    width: 80px;
    height: 80px;
    left: calc(50% - 40px);
  }
}
