/**
 * WordPress Login Page Custom Styling
 * Digital Imprint Theme - Custom Background
 * Colors: Electric Blue (#0077FF, #0099FF), Black, White
 */

body.login {
    background: #1a1d2e url('../bg/loginbg.jpg') no-repeat center center !important;
    background-size: cover !important;
    background-attachment: fixed;
    background-position: center -127px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay scuro per migliorare leggibilità */
body.login::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 0;
}

/* Logo Container - Come nell'immagine */
.login h1 {
    margin-bottom: 30px;
}

.login h1 a {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: 120px;
    height: 120px;
    border-radius: 28px;
    background: rgba(45, 55, 80, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(100, 140, 200, 0.4);
    box-shadow: 0 0 60px rgba(100, 140, 200, 0.6),
                0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login h1 a:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 80px rgba(100, 140, 200, 0.8),
                0 12px 40px rgba(0, 0, 0, 0.7);
}

/* Logo outer glow effect */
.login h1 a::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: radial-gradient(circle, rgba(100, 140, 200, 0.4), transparent);
    border-radius: 28px;
    z-index: -1;
    filter: blur(30px);
    opacity: 0.8;
}

/* Form Container */
#login {
    position: relative;
    z-index: 1;
    padding: 0;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* Message box sopra il form */
.login .message,
.login .success {
    background: rgba(40, 80, 70, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(80, 180, 140, 0.4);
    border-radius: 16px;
    color: rgba(200, 255, 230, 0.95);
    padding: 14px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.login #login_error {
    background: rgba(80, 40, 45, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(200, 100, 120, 0.4);
    border-radius: 16px;
    color: rgba(255, 200, 210, 0.95);
    padding: 14px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* Glassmorphism Form - Come nell'immagine */
#loginform,
#registerform,
#lostpasswordform {
    background: rgba(30, 35, 55, 0.25);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(70, 100, 150, 0.35);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 60px rgba(60, 100, 160, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    padding: 40px 35px 35px;
    position: relative;
    overflow: hidden;
    max-width: 380px;
    margin: 0 auto;
}

/* Rimuovi il before e after per essere più simile all'immagine */
#loginform::before,
#registerform::before,
#lostpasswordform::before {
    display: none;
}

#loginform::after,
#registerform::after,
#lostpasswordform::after {
    display: none;
}

/* Inputs - Come nell'immagine */
.login label {
    color: rgba(200, 210, 230, 0.9);
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    background: rgba(10, 15, 30, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(80, 120, 180, 0.4);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    width: 100%;
}

.login input[type="text"]::placeholder,
.login input[type="password"]::placeholder,
.login input[type="email"]::placeholder {
    color: rgba(150, 160, 180, 0.6);
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    background: rgba(15, 20, 35, 0.95);
    border-color: rgba(100, 160, 220, 0.6);
    box-shadow: 0 0 0 2px rgba(80, 140, 200, 0.3),
                inset 0 2px 4px rgba(0, 0, 0, 0.4);
    outline: none;
}

/* Submit Button - Come nell'immagine (ACCEDI button) */
.login .button-primary {
    background: linear-gradient(135deg, rgba(70, 150, 240, 1) 0%, rgba(50, 120, 220, 1) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 12px;
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 20px rgba(50, 120, 220, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    padding: 15px 24px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.login .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 ease;
}

.login .button-primary:hover {
    background: linear-gradient(135deg, rgba(80, 160, 250, 1) 0%, rgba(60, 130, 230, 1) 100%);
    box-shadow: 0 6px 30px rgba(50, 120, 220, 0.7),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.login .button-primary:hover::before {
    left: 100%;
}

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

/* Links - Come nell'immagine */
.login #nav,
.login #backtoblog {
    text-align: center;
    margin-top: 20px;
}

.login #nav a,
.login #backtoblog a {
    color: rgba(100, 160, 230, 1);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 400;
}

.login #nav a:hover,
.login #backtoblog a:hover {
    color: rgba(130, 180, 240, 1);
    text-decoration: none;
    text-shadow: 0 0 10px rgba(100, 160, 230, 0.6);
}

/* Remember Me Checkbox */
.login .forgetmenot {
    margin: 16px 0;
}

.login .forgetmenot label {
    font-size: 14px;
    color: rgba(200, 210, 230, 0.85);
    font-weight: 400;
}

.login input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(80, 120, 180, 0.5);
    border-radius: 4px;
    background: rgba(10, 15, 30, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 8px;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
}

.login input[type="checkbox"]:checked {
    background: linear-gradient(135deg, rgba(70, 150, 240, 1), rgba(50, 120, 220, 1));
    border-color: rgba(70, 150, 240, 1);
    box-shadow: 0 0 10px rgba(70, 150, 240, 0.5);
}

.login input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: bold;
}



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

.login .privacy-policy-page-link a {
    color: rgba(150, 170, 200, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    transition: all 0.3s ease;
}

.login .privacy-policy-page-link a:hover {
    color: rgba(100, 160, 230, 0.9);
    text-shadow: 0 0 8px rgba(100, 160, 230, 0.5);
}

/* Language Switcher - Custom positioning and styling */
.login .language-switcher,
.language-switcher {
    position: fixed;
    right: 75px;
    bottom: 15px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 35, 55, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(70, 100, 150, 0.3);
    border-radius: 12px;
    padding: 0% 2% !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.login .language-switcher label {
    color: rgba(200, 210, 230, 0.8);
    font-size: 14px;
    margin: 0;
}

.login .language-switcher select {
    background: rgba(10, 15, 30, 0.8);
    border: 1px solid rgba(80, 120, 180, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login .language-switcher select:focus {
    outline: none;
    border-color: rgba(100, 160, 220, 0.6);
    box-shadow: 0 0 0 2px rgba(80, 140, 200, 0.2);
}

.login .language-switcher select option {
    background: #1a1d2e;
    color: #FFFFFF;
}

/* Rimuovi Social Login Buttons per essere fedeli all'immagine */
.login .social-login-buttons {
    display: none;
}

/* Custom body styling for login page */
body.login.js.login-action-login.wp-core-ui.locale-it-it,
body.login {
    display: flex;
    flex-direction: column;
}

/* Language Switcher Form */
form#language-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom button styling for language switcher */
input.button {
    background: linear-gradient(45deg, #3b92fa, #335bf9) !important;
    color: #fff !important;
    font-weight: 600 !important;
    border: solid 2px #618aff !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    padding: 1% 6% !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

input.button:hover {
    background: linear-gradient(45deg, #4ba3ff, #4462ff) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 146, 250, 0.5) !important;
}

/* Translation icon styling */
span.dashicons.dashicons-translation {
    font-size: 30px;
    color: rgba(100, 160, 230, 1);
}

/* Responsive */
@media screen and (max-width: 600px) {
    #login {
        max-width: 90%;
        padding: 0 20px;
    }
    
    #loginform,
    #registerform,
    #lostpasswordform {
        padding: 35px 28px 30px;
    }
    
    .login h1 a {
        width: 100px;
        height: 100px;
    }
    
    .login .language-switcher,
    .language-switcher {
        bottom: 20px;
        right: 20px;
        padding: 8px 12px;
    }
    
    input.button {
        padding: 2% 8% !important;
        font-size: 14px !important;
    }
    
    span.dashicons.dashicons-translation {
        font-size: 24px;
    }
}