/* ========================================
   AUTH COMMON STYLES
   Shared styles for all authentication pages
   ======================================== */

/* Basic Reset & Typography */
body,
html {
    height: 100%;
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #F7F7F7;
    overflow-x: hidden;
}

*:focus {
    outline: none;
    box-shadow: none;
}

/* Page Layout */
.login-page,
.register-page,
.verify-registration-code-page {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

.login-page .row,
.register-page .row,
.verify-registration-code-page .row {
    flex-grow: 1;
    margin-left: 0;
    margin-right: 0;
    display: flex;
    flex-wrap: wrap;
    height: auto;
}

/* Hero Section (Left Side) */
.hero-section {
    min-height: 100vh;
}

.hero-content {
    height: 100%;
}

.hero-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Form Section (Right Side) */
.col-form {
    width: 100%;
    min-height: 100vh;
    background-color: #FFFFFF;
    border-left: 1px solid #949494;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding: 20px;
    box-sizing: border-box;
}

.authfy-login {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.authfy-panel {
    width: 100%;
    max-width: 100%;
    margin: auto;
}

/* Form Containers */
.signup-overlay,
.register-overlay {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 40px 25px;
    width: 100%;
    height: 100%;
    margin: auto;
    background-color: #FFFFFF;
}

.register-overlay {
    border: 1px solid rgba(102, 102, 102, 0.3);
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
}

/* Logo */
.logo {
    width: 100%;
    max-width: 328px;
    height: auto;
    display: block;
}

/* Form Container */
.form-container {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 21px;
    justify-content: space-between;
    padding: 20px;
    align-items: center;
}

.login-page .box-content {
    display: grid;
    gap: 10px;
    text-align: center;
    width: 100%;
}

.form-container form {
    width: 100%;
}

/* Form Fields */
.form-fields {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: space-between;
}

.text-field {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.text-field label {
    color: #666666;
    font-size: 16px;
    font-weight: 400;
    line-height: 19.36px;
    width: 100%;
    text-align: left;
}

/* Form Groups */
.form-group {
    width: 100%;
    margin-bottom: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.form-group label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
    text-align: left;
    color: #555;
    margin-bottom: 6px;
}

/* Input Fields */
.input-field,
.form-control {
    width: 100%;
    height: 56px;
    border: 1px solid rgba(102, 102, 102, 0.35);
    border-radius: 12px;
    padding: 12px 15px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control {
    border: 1px solid #E0E0E0;
    box-shadow: none;
}

.input-field:focus,
.form-control:focus {
    border-color: #1154D4;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(17, 84, 212, .6);
    outline: none;
}

/* Password Input Container */
.password-input-container {
    position: relative;
    width: 100%;
}

.password-input-container .form-control {
    padding-right: 45px;
}

/* Password Toggle Icon */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    z-index: 10;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle .fa {
    font-size: 18px;
}

/* Password toggle positioning when inside form-group */
.form-group .password-toggle {
    top: calc(50% + 8px);
    /* Adjust for label height */
}

/* Password toggle positioning when input has error */
.form-control.is-invalid+.password-toggle {
    top: calc(50% - 12px);
    /* Adjust for error message space */
}

/* For register page specific positioning */
.register-page .form-group {
    margin-bottom: 10px;
}

.register-page .form-group .password-toggle {
    bottom: 15px;
    top: auto;
    transform: none;
}

.register-page .form-control.is-invalid+.password-toggle {
    bottom: 38px;
    top: auto;
    right: 30px;
}

/* Buttons */
.btn-primary {
    background-color: #1154D4;
    border-color: #1154D4;
    border-radius: 12px;
    padding: 14px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    height: 56px;
    width: 100%;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0d47b3;
    border-color: #0d47b3;
    box-shadow: 0 4px 12px rgba(17, 84, 212, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-button {
    width: 100%;
    max-width: 100%;
    height: 66px;
    background-color: #1B74E4;
    border-radius: 25px;
    color: #FFFFFF;
    font-size: 22px;
    font-weight: 700;
    line-height: 26.62px;
    border: none;
    cursor: pointer;
    margin-top: 5px;
}

.login-page .login-button {
    border-radius: 25px;
    background: #1B74E4;
}

/* Button Loading State */
.btn-loading {
    display: none;
}

.btn-loading .fa-spinner {
    margin-right: 5px;
}

.btn:disabled .btn-loading {
    display: inline-block;
}

/* Alert Messages */
.alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin: 15px 0;
    font-size: 14px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Invalid Feedback */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    text-align: left;
}

.login-page .form-control.is-invalid {
    border-color: #dc3545;
}

.login-page .form-control.is-valid {
    border-color: #28a745;
}

/* Password Requirements */
.password-requirements {
    width: 100%;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    color: #666;
    margin-top: 8px;
    margin-bottom: 16px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    padding: 4px 0;
    position: relative;
    padding-left: 0px;
    transition: color 0.3s ease;
}

.password-requirements li::before {
    content: "✗";
    position: absolute;
    left: 0;
    top: 4px;
    color: #dc3545;
    font-weight: 600;
    transition: color 0.3s ease;
}

.password-requirements li.valid {
    color: #28a745;
}

.password-requirements li.valid::before {
    content: "✓";
    color: #28a745;
}

/* OTP Input Group */
.otp-input-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0px 0;
}

.otp-input {
    width: 60px;
    height: 60px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    background-color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: #1154D4;
    box-shadow: 0 0 8px rgba(17, 84, 212, 0.3);
}

.otp-input:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Contact Info & Timer */
.contact-info {
    font-weight: 600;
    color: #1154D4;
    margin-bottom: 0px;
    text-align: center;
    font-size: 16px;
}

.resend-otp-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 0px;
}

.resend-otp-text .timer {
    font-weight: 600;
    color: #1154D4;
}

#resend-link {
    font-weight: 600;
    user-select: none;
    color: #1154D4;
    cursor: pointer;
}

#resend-link:hover {
    text-decoration: underline;
}

/* Text Styles */
.text-verify-registration-code {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #333333;
    line-height: 1.2;
    margin-top: 0px;
    margin-bottom: 0px;
    text-align: center;
}

.forgot-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #333333;
    line-height: 1.2;
    margin-bottom: 16px;
    text-align: center;
}

.forgot-subtitle,
.reset-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #666;
    margin-bottom: 5px;
    text-align: center;
}

/* Links */
.back-to-login {
    text-align: center;
    margin-top: 0px;
}

.back-to-login a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-to-login a:hover {
    color: #1154D4;
    text-decoration: none;
}

.back-to-login a i {
    margin-right: 5px;
}

.text-muted {
    color: #666 !important;
}

.text-muted:hover {
    color: #1154D4 !important;
}

/* Account Login Text */
.account-login-text {
    width: 100%;
    max-width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.account-login-text span {
    color: #666666;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.account-login-text a {
    color: #111111;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-decoration: none;
}

/* Forgot Password Link */
.forgot-password {
    color: #111111;
    font-size: 16px;
    font-weight: 400;
    line-height: 19.36px;
    text-decoration: none;
    align-self: flex-end;
    margin-top: 8px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 23px;
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
}

.divider-line {
    flex-grow: 1;
    height: 2px;
    background-color: rgba(102, 102, 102, 0.25);
    border: none;
}

.divider span {
    color: #666666;
    font-size: 24px;
    font-weight: 400;
    line-height: 29.04px;
}

/* Social Login */
.social-login-options {
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.social-button {
    display: block;
    width: 100%;
    max-width: 100%;
    text-decoration: none;
    color: #333;
}

.social-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #333;
    border-radius: 40px;
    height: 72px;
    background: #fff;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    padding: 0 24px;
    box-sizing: border-box;
    margin: 0 auto;
}

.social-icon {
    flex: 0 0 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon img,
.social-icon i {
    max-width: 100%;
    max-height: 100%;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-text {
    flex: 1;
    text-align: left;
}

/* Radio Group */
.radio-group {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    margin-top: 0;
    gap: 20px;
}

.radio-group .radio {
    margin-top: 0;
    margin-bottom: 0;
}

.radio-group .radio label {
    padding-left: 0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.radio-group .radio input[type="radio"] {
    margin-left: 0;
    margin-right: 10px;
    position: relative;
    top: 2px;
}

/* Terms & Privacy */
.terms-privacy-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    color: #666;
    margin-top: 10px;
    width: 100%;
    text-align: center;
}

.terms-privacy-text a {
    color: #1154D4;
    font-weight: bold;
    text-decoration: none;
}

.terms-privacy-text a:hover {
    text-decoration: underline;
}

/* Animation */
.form-container {
    animation: fadeInUp 0.6s ease-out;
}

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

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

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

@media (max-width: 991px) {

    .hero-section,
    .col-form {
        min-height: auto;
    }

    .hero-section {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .register-overlay,
    .signup-overlay {
        margin: 20px auto;
        min-height: auto;
    }
}

@media (max-width: 768px) {

    .col-form {
        width: 100%;
        margin-left: 0;
        padding: 10px;
        border-left: none;
    }

    .register-overlay,
    .signup-overlay {
        padding: 20px;
    }

    .form-container {
        padding: 20px;
    }

    .form-container h2,
    .forgot-title,
    .text-verify-registration-code {
        font-size: 22px;
    }

    .forgot-subtitle,
    .reset-subtitle {
        font-size: 14px;
    }

    .otp-input-group {
        gap: 8px;
    }

    .otp-input {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .social-button {
        padding: 0;
    }

    .social-logo-container {
        font-size: 16px;
    }

    .social-logo-container .social-text {
        text-align: left;
    }
}

@media (max-width: 576px) {
    .otp-input {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .forgot-title,
    .text-verify-registration-code {
        font-size: 20px;
    }
}