/* ===================================== */
/* Global/Common Styles                  */
/* ===================================== */


.page-section {
    padding: 60px 0px;
    margin: 0;
    font-family: 'Helvetica', sans-serif;
    background-color: #FAEDE8;
}

.form-wrapper {
    background-color: #ffffff;
    border-radius: 25px;
    padding: 40px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 852px;
    margin: 0 auto;
}

.main-form {
    width: 100%;
    max-width: 534px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-group {
    margin-bottom: 15px;
    width: 100%;
    max-width: 534px;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 10px;
    border-radius: 15px;
    border: 2px solid #C2C2C2;
    background-color: #F5F5F5;
    height: unset;
    font-size: 18px;
    font-family: 'Helvetica', sans-serif;
}

.form-control::placeholder {
    color: #C2C2C2;
}

.btn-primary-red {
    width: 100%;
    max-width: 534px;
    padding: 15px 20px;
    background-color: #D9534F;
    color: #ffffff;
    border: none;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'Helvetica', sans-serif;
}

.btn-primary-red:hover {
    background-color: #c04541;
}


.red-link {
    color: #D9534F;
    text-decoration: none;
    font-weight: bold;
}

.red-link:hover {
    text-decoration: underline;
}

.dark-link {
    color: #000000;
    text-decoration: none;
    font-weight: bold;
}

.dark-link:hover {
    text-decoration: underline;
}

/* ===================================== */
/* Sign Up Page Specific Styles          */
/* ===================================== */
.sign-up-title {
    font-size: 25px;
    font-weight: 700;
    color: #000000;
    text-align: center;
    margin-bottom: 25px;
    text-transform: uppercase;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
    padding-left: 5px;
}

.custom-checkbox {
    /* Hide default checkbox */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* End hide */
    width: 20px;
    height: 20px;
    border: 2px solid #D9534F;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.custom-checkbox:checked {
    background-color: #D9534F;
    border-color: #D9534F;
}

.custom-checkbox:checked::after {
    content: '\2713';
    font-size: 16px;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-group label {
    font-size: 14px;
    color: #555555;
    line-height: 1.4;
}

.btn-create-account {
    margin-top: 15px;
}

.login-prompt {
    font-size: 16px;
    color: #555555;
    margin-top: 20px;
}

/* ===================================== */
/* Sign Up Popup Specific Styles        */
/* ===================================== */
.signup-success-popup {
    border-radius: 25px;
}

.signup-success-title {
    font-size: 25px;
    font-weight: 700;
    color: #000000;
    text-align: center;
}

.signup-success-button {
    width: 100px!important;
}

/* ===================================== */
/* Login Page Specific Styles            */
/* ===================================== */
.login-title {
    font-size: 25px;
    font-weight: 700;
    color: #000000;
    text-align: center;
}

.login-intro-text {
    font-size: 15px;
    color: #555555;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 25px;
    line-height: 1.4;
}

.password-group {
    position: relative;
    margin-bottom: 5px;
}

.password-group .form-control {
    padding-right: 50px; /* Increased padding to accommodate both eye icon and validation icon */
    position: relative;
}



.password-toggle {
    position: absolute;
    right: 18px; /* Positioned from the right edge of the input field */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 15; /* Higher z-index to appear above other elements */
    color: #666;
    font-size: 18px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* Ensure the icon is clickable */
}

/* When input has validation error, move eye icon further left to avoid overlap */
.password-group .form-control.is-invalid + .password-toggle,
.password-group .form-control:invalid + .password-toggle {
    right: 45px; /* Move further left when validation icon is present */
}

/* When input has validation success, move eye icon further left to avoid overlap with green checkmark */
.password-group .form-control.is-valid + .password-toggle {
    right: 45px; /* Move further left when green checkmark is present */
}

.password-toggle:hover {
    color: #333;
}

.password-toggle img {
    display: block;
}

/* Password requirements styling */
.password-requirements,
.password-match {
    position: relative;
    z-index: 1;
    clear: both;
}

.requirement-item {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.requirement-icon {
    flex-shrink: 0;
}

/* Forgot Password Link */
.forgot-password-link-container {
    width: 100%;
    max-width: 534px;
    text-align: right;
    margin-bottom: 25px;
}

.forgot-password-link {
    font-size: 14px;
}

.btn-login {
    margin-top: 15px;
}

/* Create Account Prompt (from login page: "Don't have an account? Create Account") */
.create-account-prompt {
    font-size: 14px;
    color: #555555;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 5px;
    width: 100%;
    max-width: 534px;
}

.create-account-link-bottom {
    font-size: 18px;
    display: block;
    text-align: center;
    margin-top: 0;
    margin-bottom: 10px;
}

/* ===================================== */
/* Forgot Password Modal Styles          */
/* ===================================== */

/* SweetAlert on Modal - Higher z-index */
.swal-on-modal {
    z-index: 10000 !important;
}

/* Modal Backdrop */
.forgot-password-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

/* Modal Content Box */
.forgot-password-modal {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: forgotPasswordModalFadeIn 0.3s ease-out;
}

@keyframes forgotPasswordModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.forgot-password-modal-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-password-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.forgot-password-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.forgot-password-modal-close:hover {
    background-color: #f8f9fa;
    color: #333;
}

/* Modal Body */
.forgot-password-modal-body {
    padding: 1rem 1.5rem 1rem 1.5rem;
}

.forgot-password-modal-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Modal Footer */
.forgot-password-modal-footer {
    padding: 1rem 2rem 2rem 2rem;
    border-top: none;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: nowrap;
}

.forgot-password-btn-submit {
    background-color: #dc3545;
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    max-width: none;
    min-width: 120px;
}

.forgot-password-btn-submit:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.forgot-password-btn-cancel {
    background-color: transparent;
    border: 2px solid #6c757d;
    color: #6c757d;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    min-width: 120px;
}

.forgot-password-btn-cancel:hover {
    background-color: #6c757d;
    color: white;
}

/* ===================================== */
/* OTP Page Specific Styles              */
/* ===================================== */
.otp-title {
    font-size: 25px;
    font-weight: 700;
    color: #000000;
    text-align: left;
    margin-bottom: 15px;
}

.otp-intro-text {
    font-size: 14px;
    color: #555555;
    text-align: left;
    margin-bottom: 25px;
    line-height: 1.4;
}

.otp-intro-text .highlight-email {
    color: #D9534F;
    font-weight: bold;
}

.otp-inputs-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 534px;
}

.otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border-radius: 10px;
    border: 2px solid #C2C2C2;
    background-color: #F5F5F5;
}

/* Hide number input arrows for Chrome, Safari, Edge, Opera */
.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.resend-otp-container {
    width: 100%;
    max-width: 534px;
    text-align: left;
    margin-bottom: 30px;
    font-size: 14px;
    color: #555555;
}

.resend-otp-link {
    cursor: pointer;
}

.resend-otp-link.disabled {
    color: #C2C2C2;
    cursor: not-allowed;
    text-decoration: none;
}

.btn-verify-otp {
    margin-top: 0;
    margin-bottom: 40px;
}

.back-to-login-link-container {
    width: 100%;
    max-width: 534px;
    text-align: center;
}

.back-to-login-link {
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    color: #444444;
}

/* ===================================== */
/* Verification Result Page Specific Styles */
/* ===================================== */

.verification-result-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.verification-container {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
}

.verification-title {
    color: #333;
    font-weight: 600;
}

.verification-message {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.verification-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.success-icon,
.error-icon {
    margin-bottom: 1.5rem;
}

/* ===================================== */
/* Media Queries for Responsiveness      */
/* ===================================== */

/* Tablet and below */
@media (max-width: 991.98px) {
    .page-section {
        padding: 40px 15px;
    }

    .form-wrapper {
        padding: 35px 40px;
        margin: 0 15px;
        border-radius: 20px;
    }

    .main-form,
    .form-group,
    .btn-primary-red,
    .forgot-password-link-container,
    .otp-inputs-container,
    .resend-otp-container,
    .back-to-login-link-container {
        max-width: 100%;
    }

    .form-control {
        font-size: 17px;
        padding: 12px 15px;
    }

    /* Signup Page specific */
    .sign-up-title {
        font-size: 23px;
    }

    .checkbox-group label {
        font-size: 15px;
    }

    .btn-create-account {
        font-size: 18px;
        padding: 14px 18px;
    }

    .login-prompt {
        font-size: 15px;
    }


    /* Login Page specific */
    .login-title {
        font-size: 23px;
    }

    .login-intro-text {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .forgot-password-link {
        font-size: 13px;
    }

    .btn-login {
        font-size: 18px;
        padding: 14px 18px;
    }

    .create-account-prompt,
    .create-account-link-bottom {
        font-size: 12px;
    }

    /* OTP Page specific */
    .otp-title {
        font-size: 23px;
    }

    .otp-intro-text {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .otp-input {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .resend-otp-container {
        font-size: 13px;
    }

    .back-to-login-link {
        font-size: 15px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .page-section {
        padding: 30px 15px;
    }

    .form-wrapper {
        padding: 30px 20px;
        margin: 0 15px;
        border-radius: 15px;
    }

    .form-control {
        font-size: 16px;
        padding: 12px 15px;
    }

    /* Signup Page specific */
    .sign-up-title {
        font-size: 22px;
    }

    .checkbox-group label {
        font-size: 14px;
    }

    .btn-create-account {
        font-size: 17px;
        padding: 13px 16px;
    }

    .login-prompt {
        font-size: 14px;
    }

    /* Login Page specific */
    .login-title {
        font-size: 22px;
    }

    .login-intro-text {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .forgot-password-link-container {
        margin-bottom: 20px;
    }

    .btn-login {
        font-size: 17px;
        padding: 13px 16px;
    }

    .create-account-prompt,
    .create-account-link-bottom {
        font-size: 12px;
    }

    /* Reset Password Page specific */
    .reset-password-title {
        font-size: 22px;
    }

    .reset-password-intro-text {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .btn-reset-password {
        font-size: 17px;
        padding: 13px 16px;
    }

    .back-to-login-link {
        font-size: 15px;
    }

    /* OTP Page specific */
    .otp-title {
        font-size: 22px;
    }

    .otp-intro-text {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .otp-input {
        width: 40px;
        height: 40px;
        font-size: 20px;
        gap: 8px;
    }

    .resend-otp-container {
        font-size: 12px;
    }

    .back-to-login-link {
        font-size: 14px;
    }

    /* Verification Result Page specific */
    .verification-actions {
        flex-direction: column;
        align-items: center;
    }

    .verification-actions a {
        width: 100%;
        max-width: 250px;
    }
}

/* Small mobile */
@media only screen and (max-width: 515px) {
    .form-wrapper {
        padding: 25px 15px;
        margin: 0 10px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Signup Page specific */
    .sign-up-title {
        font-size: 20px;
    }

    .checkbox-group label {
        font-size: 13px;
    }

    .btn-create-account {
        font-size: 16px;
        padding: 12px 15px;
    }

    .login-prompt {
        font-size: 13px;
    }

    /* Login Page specific */
    .login-title {
        font-size: 20px;
    }

    .login-intro-text {
        font-size: 12px;
    }

    .forgot-password-link {
        font-size: 12px;
    }

    .btn-login {
        padding: 12px 15px;
        font-size: 16px;
    }

    .create-account-prompt,
    .create-account-link-bottom {
        font-size: 12px;
    }

    /* OTP Page specific */
    .otp-title {
        font-size: 20px;
    }

    .otp-intro-text {
        font-size: 12px;
    }

    .otp-input {
        width: 35px;
        height: 35px;
        font-size: 18px;
        gap: 5px;
    }

    .resend-otp-container {
        font-size: 11px;
    }

    .back-to-login-link {
        font-size: 13px;
    }
}

/* Ensure the password toggle is properly positioned on mobile devices */
@media (max-width: 767.98px) {
    .password-group .form-control {
        padding-right: 45px;
    }

    .password-toggle {
        right: 15px;
        font-size: 16px;
        width: 18px;
        height: 18px;
    }

    .password-group .form-control.is-invalid + .password-toggle,
    .password-group .form-control:invalid + .password-toggle {
        right: 40px;
    }

    /* Handle valid state on mobile */
    .password-group .form-control.is-valid + .password-toggle {
        right: 40px;
    }
}