/* 
 * Impulsa Contadores - Modern Login Page
 * Premium UI with animations and glassmorphism
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Base Styles */
body.login {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a6d7a 0%, #064e57 50%, #0a6d7a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Decorative Background Elements */
body.login::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(234, 160, 100, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Floating Particles Effect */
body.login::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 50px 160px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 90px 40px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200px 200px;
    animation: particleFloat 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-200px);
    }
}

/* Login Container */
#login {
    width: 100%;
    max-width: 420px;
    padding: 0;
    position: relative;
    z-index: 10;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

/* Logo Area */
#login h1 {
    margin-bottom: 0;
}

#login h1 a {
    background-image: none !important;
    width: 100% !important;
    height: auto !important;
    text-indent: 0 !important;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 28px;
    color: #fff;
    margin-bottom: 10px;
    display: block;
    text-align: center;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#login h1 a:hover {
    transform: scale(1.02);
}

/* Subtitle */
#login h1::after {
    content: 'Accede a tu cuenta';
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

/* Form Card - Glassmorphism */
#loginform,
.login form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    padding: 40px;
    margin-top: 0;
    animation: cardGlow 3s ease-in-out infinite alternate;
}

@keyframes cardGlow {
    from {
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 30px rgba(234, 160, 100, 0);
    }

    to {
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 30px rgba(234, 160, 100, 0.1);
    }
}

/* Form Labels */
.login form .forgetmenot,
.login label {
    font-size: 13px;
    color: #555;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Input Fields */
.login form .input,
.login input[type="text"],
.login input[type="password"] {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0 18px;
    height: 52px;
    font-size: 16px;
    color: #333;
    font-weight: 500;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 5px;
    width: 100%;
    box-sizing: border-box;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus {
    background: #fff;
    border-color: #0a6d7a;
    box-shadow: 0 0 0 4px rgba(10, 109, 122, 0.15);
    outline: none;
    transform: translateY(-2px);
}

.login form .input::placeholder {
    color: #adb5bd;
}

/* Password Field Container */
.user-pass-wrap {
    margin-bottom: 20px;
}

/* Remember Me Checkbox */
.login form .forgetmenot {
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login form .forgetmenot input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0a6d7a;
    cursor: pointer;
}

.login form .forgetmenot label {
    margin: 0;
    text-transform: none;
    font-weight: 500;
    cursor: pointer;
}

/* Submit Button */
.wp-core-ui .button-primary,
#wp-submit {
    background: linear-gradient(135deg, #0a6d7a 0%, #085560 100%);
    border: none;
    color: #fff;
    text-decoration: none;
    text-shadow: none;
    box-shadow: 0 4px 15px rgba(10, 109, 122, 0.4);
    border-radius: 12px;
    height: 52px;
    line-height: 52px;
    padding: 0 30px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wp-core-ui .button-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus {
    background: linear-gradient(135deg, #085560 0%, #064e57 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(10, 109, 122, 0.5);
}

.wp-core-ui .button-primary:hover::before {
    left: 100%;
}

.wp-core-ui .button-primary:active {
    transform: translateY(-1px);
}

/* Links Section */
.login #nav,
.login #backtoblog {
    text-align: center;
    padding: 0;
    margin: 20px 0 0;
}

.login #nav a,
.login #backtoblog a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.login #nav a::after,
.login #backtoblog a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #eaa064;
    transition: width 0.3s ease;
}

.login #nav a:hover,
.login #backtoblog a:hover {
    color: #fff;
}

.login #nav a:hover::after,
.login #backtoblog a:hover::after {
    width: 100%;
}

.login #nav {
    margin-top: 25px;
}

.login #nav a {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.login #nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.login #nav a::after {
    display: none;
}

/* Hide Language Selector */
.language-switcher,
#language-switcher,
.login .language-switcher {
    display: none !important;
}

/* Error Messages */
.login .message,
.login #login_error {
    border-left: 4px solid #eaa064;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: shake 0.5s ease-in-out;
}

.login .message {
    border-left-color: #0a6d7a;
}

@keyframes shake {

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

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

/* Success Message */
.login .message {
    border-left-color: #28a745;
}

/* Privacy Policy Link */
.login .privacy-policy-page-link {
    text-align: center;
    margin-top: 15px;
}

.login .privacy-policy-page-link a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.login .privacy-policy-page-link a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive Design */
@media (max-width: 480px) {
    body.login {
        padding: 15px;
    }

    #login {
        max-width: 100%;
    }

    #loginform,
    .login form {
        padding: 30px 25px;
        border-radius: 16px;
    }

    #login h1 a {
        font-size: 24px;
    }

    .login form .input,
    .login input[type="text"],
    .login input[type="password"],
    .wp-core-ui .button-primary,
    #wp-submit {
        height: 48px;
        line-height: 48px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {

    #loginform,
    .login form {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .login label {
        color: #ccc;
    }

    .login form .input,
    .login input[type="text"],
    .login input[type="password"] {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }

    .login form .input:focus,
    .login input[type="text"]:focus,
    .login input[type="password"]:focus {
        background: #333;
    }
}