/* Login Page Specific Styles */

/* Login page body styles */
body.login-page {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
}

.login-page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--header-height, 80px);
}

.login-main-content {
    flex-grow: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0.5rem;
}

/* Main container with thin border only */
.login-container {
    display: flex;
    width: 100%;
    flex-grow: 1;
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(139, 140, 137, 0.15);
}

/* Left side - Login form (exactly 50% width) */
.login-left-side {
    width: 50%;
    flex: 0 0 50%;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--bg-primary);
    gap: 5rem;
}

.login-form-content {
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    justify-content: center;
}

/* Version Badge Styles */
.version-badge-container {
    text-align: center;
    padding: 1rem 0;
}

.version-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid var(--accent);
    background-color: var(--bg-tertiary);
    color: var(--accent);
    transition: all 0.3s ease;
}

.version-badge.connecting {
    background-color: var(--bg-tertiary) !important;
    color: var(--accent) !important;
    border-color: var(--accent) !important;
}

.version-badge.online {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.version-badge.offline {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.version-badge i {
    margin-right: 0.5rem;
}

/* Logo section */
.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-section img {
    max-width: 140px;
    height: auto;
}

/* Form header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.start-journey {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.form-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0;
    font-weight: 600;
}

/* Form styling */
.form-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
}

.form-control {
    font-size: 0.9rem;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--bg-primary);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(96, 150, 186, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: var(--placeholder-text);
    opacity: 1;
}

/* Password input */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .btn-toggle-password {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    z-index: 10;
}

.password-input-wrapper .btn-toggle-password:hover {
    color: var(--accent);
}

/* Submit button */
.btn-submit-custom {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    background-color: var(--accent);
    color: var(--secondary);
    border: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-submit-custom:hover {
    background-color: var(--primary);
}

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

/* Reset password page adjustments */
.reset-password-page .login-main-content {
    align-items: center;
    padding: 1rem;
}

.reset-password-page .login-container {
    max-width: 460px;
    margin: auto;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(26, 44, 62, 0.12);
}

.reset-password-page .login-left-side {
    width: 100%;
    flex: 1 0 auto;
    padding: 2.5rem 2.75rem;
    gap: 2rem;
}

.reset-password-page .login-right-side {
    display: none;
}

.reset-password-page .login-form-content {
    max-width: none;
    min-height: unset;
}

.reset-password-page .welcome-message {
    display: none;
}

.password-input-field {
    padding-right: 2.5rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:focus,
.password-toggle:hover {
    color: var(--accent);
}

.password-toggle i {
    font-size: 1rem;
}

/* Forgot password link */
.forgot-password-container {
    text-align: right;
    margin-bottom: 1rem;
}

.forgot-password-trigger {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0;
    cursor: pointer;
}

.forgot-password-trigger:hover,
.forgot-password-trigger:focus-visible {
    text-decoration: underline;
    color: var(--primary);
}

.forgot-password-trigger:focus {
    outline: none;
}

.forgot-password-modal {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.forgot-password-modal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

.forgot-password-modal .modal-footer {
    border-top: none;
}

.forgot-password-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

#forgot-password-feedback {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Social login section */
.social-login-section {
    margin: 1.5rem 0;
    text-align: center;
}

.social-login-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    position: relative;
}

.social-login-text::before,
.social-login-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background-color: var(--border-color);
}

.social-login-text::before {
    left: 0;
}

.social-login-text::after {
    right: 0;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.btn-social {
    width: 52px;
    height: 52px;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem
}

.btn-social:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-facebook {
    color: var(--accent);
}

.btn-facebook:hover {
    background-color: var(--accent);
    color: var(--secondary);
    border-color: var(--accent);
}

.btn-google {
    color: var(--primary);
}

.btn-google:hover {
    background-color: var(--primary);
    color: var(--secondary);
    border-color: var(--primary);
}

.btn-apple {
    color: var(--text-primary);
}

.btn-apple:hover {
    background-color: var(--text-primary);
    color: var(--secondary);
    border-color: var(--text-primary);
}

/* Disabled social login buttons */
.btn-social:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-social:disabled:hover {
    transform: none;
    box-shadow: none;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

/* Third area - Sign up link */
#third-area {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

#third-area a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}

#third-area a:hover {
    text-decoration: underline;
}

/* Right side - Background image (exactly 50% width) */
.login-right-side {
    width: 50%;
    flex: 0 0 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.welcome-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1;
}

.welcome-message {
    color: rgba(0, 0, 0, 1);
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 
        0 0 4px rgba(255, 255, 255, 1),
        0 0 8px rgba(255, 255, 255, 0.8),
        0 2px 6px rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    max-width: 90%;
    margin: 0;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
}

.welcome-line {
    opacity: 0;
    transform: none;
    display: block;
    margin-bottom: 0.8rem;
}

.welcome-line.animate {
    animation: lineAppear 0.8s ease-out forwards;
}

@keyframes lineAppear {
    0% {
        opacity: 0;
        transform: none;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes welcomeTextAppear {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Validation styles */
.form-control.is-valid {
    border-color: var(--accent);
    background-image: none !important;
    padding-right: 0.875rem !important;
}

.form-control.is-invalid {
    border-color: var(--primary);
    background-image: none !important;
    padding-right: 0.875rem !important;
}

.invalid-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    color: var(--primary);
}

.valid-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    color: var(--accent);
}

/* Hide password toggle when validation is active */
.password-input-wrapper .form-control.is-valid ~ .btn-toggle-password,
.password-input-wrapper .form-control.is-invalid ~ .btn-toggle-password {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .login-main-content {
        padding: 1rem;
    }

    .login-container {
        flex-direction: column;
        max-width: 400px;
        min-height: auto;
    }

    .login-left-side {
        width: 100%;
        flex: 1 0 auto;
        padding: 2rem;
    }

    .login-right-side {
        display: none; /* Hide image on mobile */
    }

    .form-header h3 {
        font-size: 1.375rem;
    }
}

@media (max-width: 480px) {
    .login-left-side {
        padding: 1.5rem;
    }
    
    .social-buttons {
        gap: 0.5rem;
    }
    
    .btn-social {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}
