/**
 * Clanto Login - Login Page Styles
 * Importa stili comuni da _common.css
 */

/* Social Login Section */
.clantol-social-login {
    margin-top: 20px;
    padding-top: 20px;
}

/* Separatori specifici - gli stili base sono in _common.css */
.clantol-social-divider {
    margin-bottom: 20px;
}

.clantol-oauth-separator {
    margin: 25px 0 15px;
    clear: both;
}

/* Wrapper OAuth */
#clantol-oauth-wrapper {
    clear: both;
}

/* Google Material Button (Official Style) */
.clantol-social-login .gsi-material-button,
a.gsi-material-button,
button.gsi-material-button {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-appearance: none;
    appearance: none;
    background-color: #131314;
    background-image: none;
    border: 1px solid #8e918f;
    -webkit-border-radius: 20px;
    border-radius: 20px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #ffffff !important;
    cursor: pointer;
    font-family: 'Roboto', arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    height: 40px;
    letter-spacing: 0.25px;
    line-height: 40px;
    outline: none;
    overflow: hidden;
    padding: 0 12px;
    position: relative;
    text-align: center;
    -webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
    transition: background-color .218s, border-color .218s, box-shadow .218s;
    white-space: nowrap;
    width: 100%;
    max-width: 400px;
    min-width: min-content;
    text-decoration: none;
    display: block;
}

.gsi-material-button .gsi-material-button-icon {
    height: 20px;
    margin-right: 10px;
    min-width: 20px;
    width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
    -webkit-align-items: center;
    align-items: center;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    height: 100%;
    justify-content: center;
    position: relative;
    width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
    -webkit-flex-grow: 0;
    flex-grow: 0;
    font-family: 'Roboto', arial, sans-serif;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
    -webkit-transition: opacity .218s;
    transition: opacity .218s;
    bottom: 0;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.gsi-material-button:disabled {
    cursor: default;
    background-color: #13131461;
    border-color: #8e918f1f;
}

.gsi-material-button:disabled .gsi-material-button-state {
    background-color: #e3e3e31f;
}

.gsi-material-button:disabled .gsi-material-button-contents {
    opacity: 38%;
}

.gsi-material-button:disabled .gsi-material-button-icon {
    opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state, 
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
    background-color: white;
    opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
    -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
    color: #ffffff !important;
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
    background-color: white;
    opacity: 8%;
}

/* Google Button (Fallback for non-Material) */
.clantol-social-google {
    border-color: #4285f4;
}

.clantol-social-google:hover {
    background: #f8faff;
    border-color: #4285f4;
}

/* Apple Button - Apple Human Interface Guidelines */
.clantol-social-apple {
    background: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif !important;
    font-weight: 500;
    letter-spacing: -0.01em;
    border-radius: 24px !important;
}

.clantol-social-apple:hover {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: #ffffff !important;
}

.clantol-social-apple svg {
    color: #ffffff;
}

.clantol-social-apple svg path {
    fill: #ffffff;
}

/* OAuth2 Button */
.clantol-social-oauth2 {
    border-color: #2271b1;
}

.clantol-social-oauth2:hover {
    background: #f0f6fc;
    border-color: #2271b1;
}

/* 2FA Form */
.clantol-2fa-form {
    margin-top: 20px;
}

.clantol-2fa-code-input {
    width: 100%;
    font-size: 24px;
    text-align: center;
    padding: 15px;
    margin-bottom: 15px;
}

.clantol-2fa-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.clantol-2fa-method {
    flex: 1;
    padding: 10px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.clantol-2fa-method:hover,
.clantol-2fa-method.active {
    border-color: #2271b1;
    background: #f0f6fc;
}

.clantol-2fa-method.active {
    border-width: 2px;
}

/* Error Messages */
.clantol-error {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    padding: 12px;
    margin-bottom: 20px;
}

.clantol-error p {
    margin: 0;
    color: #d63638;
}

/* Magic Link Section */
.clantol-magic-link-separator {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.clantol-magic-link-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dcdcde;
}

.clantol-magic-link-separator span {
    background: #fff;
    padding: 0 15px;
    position: relative;
    color: #646970;
    font-size: 13px;
}

/* Magic Link Wrapper */
#clantol-magic-link-wrapper {
    clear: both;
    display: block;
    width: 100%;
}

/* Magic Link Separator - override specifico */
.clantol-magic-link-separator {
    margin: 70px 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.clantol-separator-line {
    flex: 1;
    height: 1px;
    background: var(--clantol-border, #dcdcde);
}

.clantol-separator-text {
    white-space: nowrap;
}

/* Magic Link Button */
.clantol-magic-link-button {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    padding: 3px !important;
}

.clantol-magic-link-button .button {
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
}

.clantol-magic-link-btn {
    width: 100%;
    color: #fff !important;
}

/* Magic Link Request Page - Actions */
.clantol-magic-link-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.clantol-back-link {
    text-decoration: none;
    color: #2271b1;
    font-size: 14px;
}

.clantol-back-link:hover {
    color: #135e96;
}

/* Magic Link Success Page */
.clantol-magic-link-success {
    text-align: center;
    padding: 40px 20px;
}

.clantol-magic-link-success h2 {
    margin: 20px 0;
    font-size: 24px;
    font-weight: 400;
}

.clantol-success-message {
    margin: 15px 0;
    color: #646970;
    line-height: 1.6;
}

.clantol-success-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.clantol-success-actions .button {
    min-width: 150px;
}

#clantol-resend-timer {
    display: inline-block;
    margin-left: 5px;
    color: #646970;
    font-size: 13px;
}

/* wp-login.php Styling - Commentato per usare stili WordPress nativi
body.login {
    background-color: #f0f2f5;
}

body.login div#login {
    width: 400px;
    padding: 4% 0 0;
}

body.login h1 a {
    background-size: contain !important;
    width: 100% !important;
    max-width: 320px !important;
    margin-bottom: 20px !important;
}
*/

/* Stili custom wp-login commentati per usare stili WordPress nativi
body.login form {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: none;
    padding: 30px;
}

body.login label {
    font-weight: 500;
    color: #1d2327;
}

body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"] {
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #dcdcde;
    background: #fbfbfb;
    margin-top: 5px;
}

body.login input[type="text"]:focus,
body.login input[type="email"]:focus,
body.login input[type="password"]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

body.login .submit {
    margin-top: 20px;
}

body.login #wp-submit {
    width: 100%;
    border-radius: 8px;
    padding: 8px 20px;
    height: auto;
    line-height: 1.5;
    font-weight: 600;
    font-size: 15px;
    background: #2271b1;
    border: none;
}

body.login #wp-submit:hover {
    background: #135e96;
}
*/

/* Captcha styling in wp-login - Commentato per usare stili nativi
body.login .clantol-captcha-wrapper {
    margin: 20px 0 !important;
    display: flex;
    justify-content: center;
}

body.login .clantol-social-login {
    border-top: 1px solid #f0f0f1;
    margin-top: 25px;
    padding-top: 20px;
}

body.login .clantol-buttons {
    gap: 12px;
}
*/

/* Stili custom pulsanti social commentati - ora usano stili WordPress nativi
body.login .gsi-material-button,
body.login .clantol-social-apple {
    border-radius: 8px !important;
    height: 44px !important;
    line-height: 44px !important;
}
*/

/* Custom Footer Links - Commentato per usare stili WordPress nativi
body.login #nav,
body.login #backtoblog {
    text-align: center;
    margin: 15px 0 0 !important;
}
*/

/* CAPTCHA Centering */
.login form .h-captcha,
.login form .g-recaptcha,
.login form .cf-turnstile,
.login form .clantol-recaptcha,
.login form .clantol-hcaptcha,
.login form .clantol-turnstile {
    display: flex !important;
    justify-content: center !important;
    margin: 15px 0 !important;
    min-height: 78px;
}

/* Responsive - Commentato per usare stili WordPress nativi
@media screen and (max-width: 480px) {
    body.login div#login {
        width: 90%;
    }
    
    .clantol-social-button,
    button.clantol-social-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .login h1 a {
        width: 100% !important;
        max-width: 320px !important;
    }
}
*/
