/* ===================================
   Login Page Specific Styles
   JobTermin - login.css
   =================================== */

/* Login Page Specific Overrides */
.page-template-page-login .auth-page {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1425 100%);
}

/* Animated Background Orbs */
.page-template-page-login .auth-page::before {
    animation: pulse-glow 6s ease-in-out infinite;
}

.page-template-page-login .auth-page::after {
    animation: pulse-glow 8s ease-in-out infinite reverse;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Login Branding Animation */
.page-template-page-login .auth-branding h1 {
    animation: fadeInLeft 0.8s ease-out;
    background: linear-gradient(135deg, #ffffff 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Login Form Animation */
.page-template-page-login .auth-form-container {
    animation: fadeInRight 0.8s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Info Message Styles */
.auth-message.auth-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.auth-message.auth-info svg {
    color: #3b82f6;
    stroke: #3b82f6;
}

/* Form Row (Remember Me & Forgot Password) */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.forgot-password {
    color: #22d3ee;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #06b6d4;
    text-decoration: underline;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0 1.5rem;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(34, 211, 238, 0.3) 50%, 
        transparent 100%
    );
}

.auth-divider span {
    padding: 0 1rem;
    color: rgba(207, 250, 254, 0.6);
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Social Login Buttons */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 0.5rem;
    color: #cffafe;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:not(:disabled):hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(34, 211, 238, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.social-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.social-btn.google {
    border-color: rgba(66, 133, 244, 0.3);
}

.social-btn.google:not(:disabled):hover {
    border-color: rgba(66, 133, 244, 0.6);
    background: rgba(66, 133, 244, 0.1);
}

.social-btn.linkedin {
    border-color: rgba(0, 119, 181, 0.3);
}

.social-btn.linkedin:not(:disabled):hover {
    border-color: rgba(0, 119, 181, 0.6);
    background: rgba(0, 119, 181, 0.1);
}

/* Login Input Focus Enhancement */
.page-template-page-login .input-wrapper input:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
    animation: inputFocusGlow 0.3s ease-out;
}

@keyframes inputFocusGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 211, 238, 0);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(34, 211, 238, 0.2);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
    }
}

/* Login Button Enhancement */
.page-template-page-login .btn-submit {
    position: relative;
    overflow: hidden;
}

.page-template-page-login .btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%
    );
    transition: left 0.5s ease;
}

.page-template-page-login .btn-submit:hover::before {
    left: 100%;
}

/* Login Success Animation */
.page-template-page-login .auth-success {
    animation: successBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-20px);
    }
    50% {
        transform: scale(1.05) translateY(0);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Login Error Shake */
.page-template-page-login .auth-error {
    animation: errorWiggle 0.6s ease-out;
}

@keyframes errorWiggle {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px) rotate(-1deg);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px) rotate(1deg);
    }
}

/* Remember Me Checkbox Enhancement */
.page-template-page-login .checkbox-label {
    transition: all 0.3s ease;
}

.page-template-page-login .checkbox-label:hover {
    color: #ffffff;
}

.page-template-page-login .checkbox-custom {
    border-color: rgba(34, 211, 238, 0.6);
}

.page-template-page-login .checkbox-label:hover .checkbox-custom {
    border-color: #22d3ee;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.3);
}

/* Auto-fill Detected Animation */
.page-template-page-login input:-webkit-autofill,
.page-template-page-login input:-webkit-autofill:hover,
.page-template-page-login input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(34, 211, 238, 0.1) inset;
    transition: background-color 5000s ease-in-out 0s;
    border-color: rgba(34, 211, 238, 0.5);
}

/* Loading Overlay (for redirect) */
.login-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.login-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.login-loading-content {
    text-align: center;
    color: #ffffff;
}

.login-loading-content svg {
    width: 4rem;
    height: 4rem;
    color: #22d3ee;
    margin-bottom: 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-loading-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-loading-content p {
    color: #cffafe;
    font-size: 1rem;
}

/* Progressive Enhancement for Modern Browsers */
@supports (backdrop-filter: blur(20px)) {
    .page-template-page-login .auth-container {
        backdrop-filter: blur(20px);
    }

    .page-template-page-login .social-btn {
        backdrop-filter: blur(10px);
    }
}

/* Capslock Warning */
.capslock-warning {
    display: none;
    color: #fbbf24;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease-out;
}

.capslock-warning.show {
    display: flex;
}

.capslock-warning svg {
    width: 1rem;
    height: 1rem;
}

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

/* Mobile Specific Enhancements */
@media (max-width: 768px) {
    .page-template-page-login .social-login {
        grid-template-columns: 1fr;
    }

    .page-template-page-login .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-template-page-login .forgot-password {
        margin-top: 0.5rem;
    }
}

@media (max-width: 640px) {
    .page-template-page-login .auth-divider span {
        font-size: 0.75rem;
        padding: 0 0.75rem;
    }

    .page-template-page-login .social-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Accessibility: Focus Visible */
.page-template-page-login *:focus-visible {
    outline: 3px solid #22d3ee;
    outline-offset: 3px;
    border-radius: 0.25rem;
}

/* Print Styles */
@media print {
    .page-template-page-login .auth-page::before,
    .page-template-page-login .auth-page::after,
    .page-template-page-login .auth-branding,
    .page-template-page-login .social-login,
    .page-template-page-login .auth-divider {
        display: none;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    .page-template-page-login .auth-page {
        background: linear-gradient(135deg, #000000 0%, #0a0e27 50%, #000000 100%);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .page-template-page-login *,
    .page-template-page-login *::before,
    .page-template-page-login *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .page-template-page-login .input-wrapper input {
        border-width: 2px;
        border-color: #22d3ee;
    }

    .page-template-page-login .btn-submit {
        border: 3px solid #22d3ee;
    }

    .page-template-page-login .social-btn {
        border-width: 2px;
    }
}
