/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #c9d6ff;
    background: linear-gradient(to right, #e2e2e2, #c9d6ff);
}

/* Container */
.container {
    background: #fff;
    width: 90%; /* Percentage width for responsiveness */
    max-width: 450px; /* Limit the max width */
    padding: 1.5rem;
    margin: 50px auto;
    border-radius: 10px;
    box-shadow: 0 20px 35px rgba(0, 0, 1, 0.9);
}

/* Form Styles */
form {
    margin: 0 2rem;
}

.form-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    padding: 1.3rem;
    margin-bottom: 0.4rem;
    color: #333;
}

.hidden {
    display: none;
}

/* Input Group Styles */
.input-group {
    padding: 1% 0;
    margin-bottom: 20px; /* Added space between input fields */
    position: relative;
}

.input-group label {
    color: #757575;
    font-size: 16px;
    margin-bottom: 5px; /* Space between label and input */
    display: block; /* Ensure label appears above the input */
    white-space: nowrap; /* Prevent label text from wrapping */
}

.input-group input,
.input-group select {
    color: inherit;
    width: 100%;
    background-color: transparent;
    border: 2px solid #ccc;
    padding: 10px 1.5rem; /* Added padding for icon space */
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease-in-out;
    box-sizing: border-box; /* Ensures padding doesn't mess with width */
}

.input-group input:focus,
.input-group select:focus {
    border: 2px solid #6c63ff; /* Purple color on focus */
}

.input-group input::placeholder,
.input-group select::placeholder {
    color: transparent;
}

.input-group input:focus~label,
.input-group select:focus~label,
.input-group input:not(:placeholder-shown)~label,
.input-group select:not(:placeholder-shown)~label {
    color: #6c63ff; /* Purple color when focused */
    font-size: 12px;
}

/* Align Icon to the left inside the input field */
.input-group i {
    position: absolute;
    left: 15px; /* Space from the left edge of the input */
    top: 50%;
    transform: translateY(-50%); /* Vertically center the icon */
    font-size: 18px;
    color: #6c63ff;
}

/* Button Styles */
button {
    font-size: 1.1rem;
    padding: 12px;
    border-radius: 5px;
    outline: none;
    border: none;
    width: 100%;
    background: #6c63ff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    margin-top: 20px;
}

button:hover {
    background-color: #4e44b8;
}

.or {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    text-align: center;
    color: #757575;
    margin: 20px 0; /* Adjust the top and bottom margin for more space */
}

.icons {
    text-align: center;
}

.icons i {
    color: #6c63ff;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    border: 2px solid #dfe9f5;
    margin: 0 15px;
    transition: 0.3s;
}

.icons i:hover {
    background: #07001f;
    font-size: 1.6rem;
    border: 2px solid #6c63ff;
}

.links {
  text-align: center;
  margin-top: 10px;
}

.links p,
.links .link-button {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
  line-height: 1;         /* keeps baseline aligned */
}

.links .link-button {
  width: auto !important;        /* override width:100% */
  padding: 0;
  margin-left: 6px;
  background: none;
  border: none;
  color: #6c63ff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 15px;
  font-weight: normal;
}


.link-button,
#signUpButton,
#signInButton {
  background: none;
  border: none;
  color: #6c63ff;
  cursor: pointer;
  font-size: 15px;        /* match .links text */
  font-weight: normal;    /* keep consistent weight */
  margin-left: 4px;       /* small spacing between text and link */
  padding: 0;
  text-decoration: underline;
  vertical-align: baseline; /* align with text */
}

.link-button:hover,
#signUpButton:hover,
#signInButton:hover {
  color: #4e44b8;
}

#signUpButton, #signInButton {
    color: #6c63ff;
    border: none;
    background-color: transparent;
    font-size: 1rem;
    font-weight: bold;
}

#signUpButton:hover, #signInButton:hover {
    text-decoration: underline;
    color: #4e44b8;
}

/* Recover Link */
.recover {
    text-align: right;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.recover a {
    text-decoration: none;
    color: rgb(125, 125, 235);
}

.recover a:hover {
    color: blue;
    text-decoration: underline;
}

/* Password Container */
.password-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.password-container input {
    flex: 1;
}

#togglePassword, #toggleConfirmPassword {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    font-size: 18px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Error Message */
.error-text {
    color: red;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* Marketing Opt */
.marketing-opt {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align checkbox and text horizontally */
    margin-bottom: 20px; /* Space between checkbox and other inputs */
}

.marketing-opt input[type="checkbox"] {
    margin-right: 10px; /* Space between checkbox and text */
}

.marketing-opt label {
    font-size: 14px; /* Adjust text size to fit better */
    color: #333;
}

/* Message Div */
.messageDiv {
    background-color: hsl(327, 90%, 28%);
    color: white;
    padding: 10px 20px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 1rem;
    display: none;       /* hidden by default */
    opacity: 1;          /* fully visible when shown */
    transition: opacity 0.5s ease; /* smooth fade */
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        width: 90%; /* Full width for smaller devices */
        padding: 1rem;
    }

    form {
        margin: 0 1rem; /* Adjust margins for smaller screens */
    }

    .form-title {
        font-size: 1.3rem; /* Adjust title size for small screens */
    }

    .input-group {
        padding: 1% 0;
        flex-direction: column;
        align-items: flex-start; /* Stack label, icon, and input on mobile */
    }

    .input-group input,
    .input-group select {
        padding: 10px 1rem;
        font-size: 14px; /* Adjust font size for smaller screens */
        width: 100%;
    }

    .input-group i {
        position: absolute;
        left: 10px;
        font-size: 16px;
    }

    .icons i {
        font-size: 1.4rem;
        padding: 0.6rem 1.2rem; /* Smaller icon sizes */
    }

    .links {
        padding: 0 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%; /* Full width for very small screens */
        padding: 1rem;
    }

    .form-title {
        font-size: 1.2rem;
    }

    .input-group input,
    .input-group select {
        padding: 8px 1rem;
        font-size: 13px; /* Further adjust for small screens */
    }

    .input-group i {
        font-size: 14px;
    }

    .icons i {
        font-size: 1.3rem;
        padding: 0.5rem 1rem;
    }

    .links {
        flex-direction: column;
        padding: 0;
    }
}

.input-group select {
  /* Match normal input sizing */
  width: 100%;
  padding: 10px 1rem;          /* tighter padding than text inputs */
  font-size: 16px;             /* same as inputs */
  line-height: 1.5;            /* vertically center text */
  border: 2px solid #ccc;      /* same border */
  border-radius: 4px;          /* match input radius */
  background-color: #fff;      /* solid background */
  appearance: none;            /* remove native arrow for custom one below */
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
}

/* If you want a custom arrow */
.input-group select {
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5'%3E%3Cpath fill='%23333' d='M0 0l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 0.65rem auto;
}

/* Undo any placeholder-color trick */
.input-group select::placeholder {
  color: inherit !important;
}

/* Ensure floating labels don’t get confused by select */
.input-group select:focus ~ label,
.input-group select:not(:placeholder-shown) ~ label {
  color: #6c63ff;
  font-size: 12px;
}

/* Keep this as your outer wrapper with border */
.input-wrapper.password-wrapper {
  position: relative;         /* Needed for absolutely positioning the toggle */
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  height: 40px;               /* Ensure consistent height */
}

/* Style the input to fill available space and leave room for toggle */
.input-wrapper.password-wrapper input {
  flex: 1;
  padding: 10px 40px 10px 10px; /* Right padding for button */
  border: none;
  outline: none;
  font-size: 16px;
  height: 100%;
}

.input-wrapper.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  height: 40px;
  width: 100%;
}

.input-wrapper.password-wrapper input {
  flex: 1;
  padding: 10px 40px 10px 10px; /* Extra right padding for the button */
  border: none;
  font-size: 16px;
  height: 100%;
}

.input-wrapper.password-wrapper button {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Style the password visibility toggle button */
#login-form .password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#togglePasswordLogin {
    position: absolute;
    top: 50%;
    transform: translateY(-120%); /* Perfect vertical centering */
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px; /* Adjust icon size */
    padding: 5px;
    z-index: 2;
    color: #555; /* Customize as needed */
    transition: color 0.3s;
}

#togglePasswordLogin:hover {
    color: #000;
}

#error-message,
#loginError {
    color: red;
    margin-top: 10px;
    text-align: center;
}
