@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

@import "./variable.css";

* {
    font-family: "poppins", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #c9d6ff;
    background: linear-gradient(to right, #e2e2e2, #c9d6ff);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
    padding: 20px;
}

.container {
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: calc(100vw - 40px);
    min-height: 620px;
}

.container p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 5px 0;
}

.term-conditions{
    font-size: 11px !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.term-conditions input{
    width: auto !important;
    margin-right: 6px !important;
}

.container span {
    font-size: 13px;
}

.container a {
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;

}

.container button {
    background-color: var(--primary-clr);
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
}

.container button.mobile-switch {
    display: none;
    background-color: transparent;
    border-color: var(--primary-clr);
    color: var(--primary-clr);
}

.container button.hidden {
    background-color: transparent;
    border-color: #fff;
    width: 50%;
    margin-left: 80px;
}

.container form {
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
}


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


.container button.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    background-color: transparent;
    border: none;
    color: #666;
    font-size: 15px;
    transform: translateY(-50%);
}

.container button.password-toggle:hover {
    color: var(--primary-clr);
}


.form-message,
.field-message {
    display: none;
    width: 100%;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.form-message {
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 8px;
}

.error-message,
.alert-danger,
.text-danger {
    color: #d93025;
}

.success-message,
.alert-success,
.text-success {
    color: #138a36;
}

.form-message.error-message,
.form-message.alert-danger {
    background-color: #fdecea;
}

.form-message.success-message,
.form-message.alert-success {
    background-color: #e9f7ef;
}

.container input.is-invalid {
    border: 1px solid #d93025;
    background-color: #fff6f5;
}

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


.otp-group,
.password-group,
.create-account-btn {
    display: none;
}

.otp-group {
    width: 100%;
    margin-top: 10px;
    text-align: center;
}

.otp-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

.otp-inputs input {
    width: 36px;
    height: 42px;
    padding: 0;
    text-align: center;
    font-size: 18px;
}

.password-group {
    width: 100%;
    margin-top: 4px;
}

.password-group .password-field + .password-field {
    margin-top: 4px;
}

.container input {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

.password-field input {
    padding-right: 46px;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in {
    left: 50%;
    width: 50%;
    z-index: 2;
}

.container.active .sign-in {
    transform: translateX(-100%);
}

.sign-up {
    left: 50%;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.active .sign-up {
    transform: translateX(-100%);
    opacity: 1;
    z-index: 5;
    animation: move 0.6s;
}

@keyframes move {

    0%,
    49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

.social-icons {
    margin: 20px 0;
}

.social-icons a {
    border: 1px solid #ccc;
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 3px;
    width: 40px;
    height: 40px;
}

.toggle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 0 150px 100px 0;
    z-index: 1000;
}

.container.active .toggle-container {
    transform: translateX(100%);
    border-radius: 150px 0 0 100px;
}

.toggle {
    background-color: var(--primary-clr);
    height: 100%;
    /* background: linear-gradient(to right, #5c6bc0, #512da8); */
    color: #fff;
    position: relative;
    left: 0;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.container.active .toggle {
    transform: translateX(-50%);
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.toggle-left {
    transform: translateX(0);
}

.container.active .toggle-left {
    transform: translateX(-200%);
}

.toggle-right {
    right: 0;
    transform: translateX(200%);
}

.container.active .toggle-right {
    transform: translateX(0);
}

@media (max-width: 991px) {
    body {
        justify-content: center;
        padding: 24px 16px;
    }

    .container {
        width: min(100%, 460px);
        max-width: 100%;
        min-height: auto;
        border-radius: 24px;
    }

    .toggle-container {
        display: none;
    }

    .form-container {
        position: relative;
        top: auto;
        left: 0;
        width: 100%;
        height: auto;
        transition: none;
    }

    .sign-in {
        left: 0;
        width: 100%;
        opacity: 1;
        z-index: 2;
    }

    .sign-up {
        display: none;
        left: 0;
        width: 100%;
        opacity: 1;
        z-index: 2;
    }

    .container.active .sign-in {
        display: none;
        transform: none;
    }

    .container.active .sign-up {
        display: block;
        transform: none;
        animation: none;
    }

    .container form {
        height: auto;
        min-height: auto;
        padding: 42px 28px;
    }

    .container h1 {
        font-size: 28px;
        text-align: center;
    }

    .container span {
        text-align: center;
    }

    .container input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .password-field input {
        padding-right: 46px;
    }


    .otp-inputs {
        gap: 5px;
    }

    .otp-inputs input {
        width: 34px;
        height: 42px;
        padding: 0;
    }

    .container button {
        width: 100%;
        max-width: 260px;
        padding: 12px 20px;
    }

    .container button.password-toggle {
        width: 34px;
        max-width: none;
        padding: 0;
    }


    .container button.mobile-switch {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        margin-top: 12px;
    }

    .social-icons {
        margin: 16px 0;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px 12px;
    }

    .container {
        border-radius: 18px;
    }

    .container form {
        padding: 34px 20px;
    }

    .container h1 {
        font-size: 24px;
    }

    .social-icons a {
        width: 36px;
        height: 36px;
    }


    .otp-inputs {
        gap: 4px;
    }

    .otp-inputs input {
        width: 30px;
        height: 40px;
        padding: 0;
        font-size: 16px;
    }
}



.forgot-password-link,
.back-link {
    color: var(--primary-clr);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.forgot-password-link {
    align-self: flex-end;
    margin: 4px 0 2px;
}

.back-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.forgot-password-link:hover,
.back-link:hover {
    text-decoration: underline;
}

.forgot-container {
    width: min(100%, 430px);
}

.forgot-card {
    width: 100%;
    padding: 42px 36px;
    background-color: #fff;
    border-radius: 24px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.forgot-card h1 {
    font-size: 30px;
    text-align: center;
}

.forgot-card p {
    margin: 14px 0 22px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.forgot-card input {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

.forgot-card input.is-invalid {
    border: 1px solid #d93025;
    background-color: #fff6f5;
}

.forgot-card button {
    background-color: var(--primary-clr);
    color: #fff;
    font-size: 12px;
    padding: 12px 32px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
}

.forgot-card button.secondary-button {
    background-color: transparent;
    border-color: var(--primary-clr);
    color: var(--primary-clr);
}

.forgot-step {
    width: 100%;
    text-align: center;
}

#forgotOtpStep,
#forgotPasswordStep {
    display: none;
}

.forgot-step label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.forgot-card .password-field {
    margin-top: 4px;
}

.forgot-card .password-field input {
    padding-right: 46px;
}

.forgot-card button.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    background-color: transparent;
    border: none;
    color: #666;
    font-size: 15px;
    transform: translateY(-50%);
}

@media (max-width: 480px) {
    .forgot-card {
        padding: 34px 20px;
        border-radius: 18px;
    }

    .forgot-card h1 {
        font-size: 24px;
    }

    .forgot-card button:not(.password-toggle) {
        width: 100%;
    }
}

.forgot-card .otp-inputs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

.forgot-card .otp-inputs input {
    flex: 0 0 36px;
    width: 36px;
    height: 42px;
    padding: 0;
    text-align: center;
    font-size: 18px;
}

@media (max-width: 480px) {
    .forgot-card .otp-inputs {
        gap: 4px;
    }

    .forgot-card .otp-inputs input {
        flex-basis: 30px;
        width: 30px;
        height: 40px;
        padding: 0;
        font-size: 16px;
    }
}
