@import url("./global-motion-responsive.css");

* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url("/images/carlogo.png") no-repeat center center fixed;
    background-size: cover;
    overflow: hidden;
}

/* THE GLASS BOX */
.glass-container {
    position: relative;
    width: 400px;
    min-height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.glass-container img {
    width: 380px;
    height: auto;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
}

.form-value {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.credentials-part {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 100%;
}

.inputbox {
    position: relative;
    margin: 15px 0;
    width: 100%;
    border-bottom: 2px solid #fff;
    ;
}

.inputbox label {
    position: absolute;
    top: 50%;
    left: 2%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 1em;
    pointer-events: none;
    transition: .5s;
}

/* Floating Label Animation */
input:focus~label,
input:valid~label {
    top: -5px;
    font-size: 0.8em;
    color: #03a9f4;
}

.inputbox input {
    width: 100%;
    height: 50px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1em;
    padding: 0 35px 0 5px;
    color: #fff;
}

.inputbox input:-webkit-autofill,
.inputbox input:-webkit-autofill:hover,
.inputbox input:-webkit-autofill:focus,
.inputbox input:-webkit-autofill:active {
    /* 1. Force the text color to be white */
    -webkit-text-fill-color: #fff !important;

    /* 2. The Hack: Delay the background color switch for 5000 seconds */
    /* This keeps your transparent background visible */
    transition: background-color 5000s ease-in-out 0s;

    /* 3. Ensure no box-shadow covers your design */
    box-shadow: 0 0 0px 1000px transparent inset !important;
}

/* Layout for Country Code + Phone Number */
.phone-group {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.code-box {
    width: 30px;
    margin-bottom: 15px;
}

.code-box input {
    text-align: center;
    padding: 0;
}

.phone-box {
    flex: 1;
    margin-bottom: 15px;
}

button#btn {
    width: 100%;
    height: 45px;
    border-radius: 2px;
    background: #fff;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    margin-top: 10px;
    transition: 0.3s;
    color: #333;
}

button#btn:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

button#btn:disabled {
    background: rgba(255, 255, 255, 0.3);
    /* Transparent look */
    color: #eee;
    cursor: not-allowed;
    transform: none;
    /* No hover effect */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* =============================
   2. UPDATED OTP MODAL STYLES
============================= */
#otp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    animation: fadeIn 0.3s ease-in-out;
}

#otp-modal.hidden {
    display: none;
}

.otp-container {
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
}

.otp-header {
    margin-bottom: 15px;
}

.otp-header h2 {
    font-size: 20px;
    color: #333;
    font-weight: 700;
    margin-bottom: 10px;
}

.header-timer {
    font-size: 14px;
    color: #555;
    font-weight: 500;
    margin-bottom: 15px;
}

/* --- PROGRESS BAR --- */
.timer-bar-container {
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 25px;
    overflow: hidden;
}

.timer-bar-fill {
    height: 100%;
    width: 100%;
    background-color: #2e7d32;
    /* Green color */
    transform-origin: left;
}

/* Progress bar is now driven by JS transition (supports dynamic duration).
   The .animating class and @keyframes are no longer used. */

/* --- TEXT --- */
.otp-instruction {
    font-size: 15px;
    color: #333;
    margin-bottom: 20px;
}

/* --- INPUTS --- */
.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

.otp-input {
    width: 45px;
    height: 45px;
    text-align: center;
    font-size: 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
}

.otp-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* --- ACTIONS (Cancel / Submit) --- */
.otp-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

#back-to-login {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-family: inherit;
    background: none;
    border: 1px solid #007bff;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

#back-to-login:hover {
    background: #f0f8ff;
}

#back-to-login:focus {
    outline: none;
    box-shadow: none;
}

#back-to-login:active {
    outline: none;
    background: #e0eeff;
}

.verify-btn {
    background: #0056b3;
    color: white;
    border: none;
    padding: 9px 25px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.verify-btn:hover {
    background: #004494;
}

/* Resend Link */
.resend-container {
    font-size: 13px;
    color: #666;
}

#resend-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
}

#resend-btn:disabled {
    color: #999;
    text-decoration: none;
    cursor: default;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.otp-instruction {
    font-size: 15px;
    color: #333;
    /* Dark grey/black text */
    margin-bottom: 20px;
    margin-top: 0;
    line-height: 1.4;
}

/* The masked number itself */
.otp-instruction strong {
    font-weight: 700;
    color: #000;
    /* Make the number slightly darker/bolder */
}




/*--- SUCCESS ANIMATION ---*/
.success-checkmark {
    width: 80px;
    height: 115px;
    margin: 0 auto;
}

.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #4CAF50;
}

.check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.check-icon::before,
.check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: #FFFFFF;
    transform: rotate(-45deg);
}

.icon-line {
    height: 5px;
    background-color: #4CAF50;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

.icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(76, 175, 80, .5);
}

.icon-fix {
    top: 8px;
    width: 5px;
    left: 26px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: #FFFFFF;
}

@keyframes rotate-circle {
    0% {
        transform: rotate(-45deg);
    }

    5% {
        transform: rotate(-45deg);
    }

    12% {
        transform: rotate(-405deg);
    }

    100% {
        transform: rotate(-405deg);
    }
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }

    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }

    100% {
        width: 25px;
        left: 14px;
        top: 46px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    84% {
        width: 55px;
        right: 0px;
        top: 35px;
    }

    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}