/**
 * Authentication Pages Styles (Login & Register)
 * Brand: medicalcounseling.in
 */

/* ===================================
   Auth Wrapper
   =================================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F3D64 0%, #1a5280 50%, #2E8B57 100%);
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

/* ===================================
   Auth Box
   =================================== */
.login-box {
    max-width: 1000px;
    width: 100%;
    background: var(--pure-white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.6s ease;
}

/* ===================================
   Left Side (Form)
   =================================== */
.login-left {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-left h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--medical-navy);
    margin-bottom: 12px;
}

.login-left p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Form Elements */
.login-left form {
    width: 100%;
}

.login-left input[type="text"],
.login-left input[type="email"],
.login-left input[type="password"],
.login-left input[type="tel"],
.login-left select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 15px;
    color: var(--medical-navy);
    background: var(--pure-white);
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.login-left input:focus,
.login-left select:focus {
    outline: none;
    border-color: var(--medical-green);
    box-shadow: 0 0 0 4px rgba(46, 139, 87, 0.1);
}

.login-left input::placeholder {
    color: rgba(112, 128, 144, 0.6);
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.password-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--medical-green);
}

/* Form Footer */
.form-footer {
    margin-bottom: 24px;
}

.form-footer a {
    color: var(--medical-green);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--medical-green-dark);
}

/* Submit Button */
.login-left button[type="submit"],
.login-left button[type="button"] {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: var(--pure-white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(46, 139, 87, 0.3);
    margin-top: 8px;
}

.login-left button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(46, 139, 87, 0.4);
}

.login-left button:active {
    transform: translateY(0);
}

/* Register Text */
.register-text {
    text-align: center;
    margin-top: 24px;
    font-size: 15px;
    color: var(--text-secondary);
}

.register-text a {
    color: var(--medical-green);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.register-text a:hover {
    color: var(--medical-green-dark);
}

/* ===================================
   Right Side (Illustration)
   =================================== */
.login-right {
    background: linear-gradient(135deg, rgba(15, 61, 100, 0.05) 0%, rgba(46, 139, 87, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
}

.login-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="2" fill="rgba(15,61,100,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.login-right img {
    max-width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

/* ===================================
   Error Messages
   =================================== */
.text-red-500 {
    color: #EF4444 !important;
    font-size: 13px;
    display: block;
    margin-top: 4px;
    margin-bottom: 8px;
}

.text-green-500 {
    color: #10B981 !important;
    font-size: 13px;
    display: block;
    margin-top: 4px;
}

/* ===================================
   OTP Section
   =================================== */
.otp_send {
    background: rgba(46, 139, 87, 0.05);
    padding: 24px;
    border-radius: 12px;
    border: 2px dashed var(--medical-green);
    margin-bottom: 16px;
}

.otp_send p {
    color: var(--medical-navy);
    font-weight: 600;
    margin-bottom: 16px;
}

#divOuter {
    width: 220px;
    overflow: hidden;
    margin: 0 auto;
}

#divInner {
    left: 0;
    position: sticky;
    text-align: center;
}

#partitioned,
#partitioned_sms,
#partitioned_email {
    padding-left: 15px;
    letter-spacing: 42px;
    border: 0;
    background-image: linear-gradient(to left, var(--medical-green) 70%, rgba(255, 255, 255, 0) 0%);
    background-position: bottom;
    background-size: 50px 2px;
    background-repeat: repeat-x;
    background-position-x: 35px;
    font-size: 24px;
    font-weight: 700;
    color: var(--medical-navy);
}

#partitioned:focus,
#partitioned_sms:focus,
#partitioned_email:focus {
    outline: none;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 991px) {
    .login-box {
        grid-template-columns: 1fr;
        max-width: 600px;
    }

    .login-right {
        display: none;
    }

    .login-left {
        padding: 50px 40px;
    }
}

@media (max-width: 767px) {
    .login-wrapper {
        padding: 20px 15px;
    }

    .login-left {
        padding: 40px 30px;
    }

    .login-left h2 {
        font-size: 28px;
    }

    .login-left p {
        font-size: 15px;
    }

    .login-left input,
    .login-left select {
        padding: 12px 16px;
        font-size: 14px;
    }

    .login-left button {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 30px 20px;
    }

    .login-left h2 {
        font-size: 24px;
    }
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ===================================
   Additional Enhancements
   =================================== */

/* Select Dropdown Styling */
.login-left select {
    appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23708090" d="M6 9L1 4h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
    cursor: pointer;
}

/* Loading State */
.login-left button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Message */
.correct {
    color: #10B981 !important;
    font-size: 13px;
    display: block;
    margin-top: 4px;
}

/* Row Spacing for Register Form */
.login-left .row {
    margin-left: -8px;
    margin-right: -8px;
}

.login-left .row>div {
    padding-left: 8px;
    padding-right: 8px;
}

/* Focus Ring */
.login-left input:focus-visible,
.login-left select:focus-visible {
    outline: 2px solid var(--medical-green);
    outline-offset: 2px;
}