/* Updated all CSS selectors to use vrc-login prefix instead of my-custom */
/* General styling for the login form wrapper */
.vrc-login-form-wrapper {
  max-width: 600px;
  width: 90%;
  margin: 50px auto;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  z-index: 10; /* Ensure form is above background */
}

/* Pseudo-element for background opacity and blend mode */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0); /* Default, will be overridden by Elementor */
  z-index: -1;
}

/* Headings and description */
.vrc-login-heading {
  font-size: 2em;
  margin-bottom: 10px;
  color: #333;
}

.vrc-login-description {
  font-size: 1em;
  color: #666;
  margin-bottom: 20px;
}

/* Form fields */
.vrc-login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vrc-login-field {
  position: relative;
  margin-bottom: 15px;
}

/* More specific selectors for inputs */
.vrc-login-form-wrapper .vrc-login-field input[type="text"],
.vrc-login-form-wrapper .vrc-login-field input[type="password"] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
  background-color: #f9f9f9;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.vrc-login-form-wrapper .vrc-login-field input[type="text"]:focus,
.vrc-login-form-wrapper .vrc-login-field input[type="password"]:focus {
  border-color: #3f51b5;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
  outline: none;
}

/* Animated Labels */
.vrc-login-form-wrapper .vrc-login-label {
  position: absolute;
  left: 15px;
  top: 12px; /* Initial position, aligned with placeholder */
  color: #999;
  font-size: 1em;
  pointer-events: none;
  transition: all 0.2s ease-out;
  background-color: transparent; /* Ensure no background interferes */
  padding: 0 5px;
  z-index: 1;
}

/* Label animation when input is focused or has content */
.vrc-login-form-wrapper .vrc-login-field.has-focus .vrc-login-label,
.vrc-login-form-wrapper .vrc-login-field input:not(:placeholder-shown) + .vrc-login-label {
  /* Added has-focus for JS control */
  top: -10px; /* Move label up */
  left: 10px;
  font-size: 0.8em;
  color: #0073aa;
  background-color: #ffffff; /* Match form background */
  padding: 0 5px;
}

/* Placeholder text fading */
.vrc-login-form-wrapper .vrc-login-field input::placeholder {
  /* Generalize */
  transition: opacity 0.2s ease-out;
  opacity: 1;
}

.vrc-login-form-wrapper .vrc-login-field input:focus::placeholder {
  /* Generalize */
  opacity: 0; /* Fade out placeholder on focus */
}

/* Submit button */
.vrc-login-submit-button {
  width: 100%;
  padding: 12px 20px;
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

.vrc-login-submit-button:hover {
  background-color: #005177;
}

.vrc-login-submit-button:active {
  transform: translateY(1px);
}

/* Error message */
.vrc-login-error-message {
  color: #dc3232;
  font-size: 0.9em;
  margin-bottom: 15px;
  text-align: left;
  padding: 5px 0;
}

/* Error input styling */
.vrc-login-form-wrapper .vrc-login-field input.input-error {
  border-color: #dc3232;
  box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .vrc-login-form-wrapper {
    margin: 30px auto;
    padding: 20px;
  }

  .vrc-login-heading {
    font-size: 1.8em;
  }
}

@media (max-width: 480px) {
  .vrc-login-form-wrapper {
    margin: 20px 15px;
    padding: 15px;
  }

  .vrc-login-heading {
    font-size: 1.5em;
  }

  .vrc-login-form-wrapper .vrc-login-field input[type="text"],
  .vrc-login-form-wrapper .vrc-login-field input[type="password"],
  .vrc-login-submit-button {
    padding: 10px 12px;
    font-size: 0.95em;
  }
}
