/**
 * Authyo Security Login Styles
 */

/* Wrapper for the entire Authyo login section */
#authyo-login-wrapper {
    margin: 0 auto;
    max-width: 320px;
    clear: both;
}

/* Hide default WordPress login form when passwordless login is enabled */
body.login #loginform,
body.login #nav,
body.login #backtoblog {
    display: none !important;
}

/* Keep WordPress logo visible */
body.login h1 a {
    display: block;
}

/* When passwordless login is enabled, ensure proper spacing */
body.login #authyo-login-wrapper {
    margin-top: 20px;
}

/* Main container matching WordPress login form styling */
#authyo-login-container {
    padding: 26px 24px 34px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
    border-radius: 0;
    box-sizing: border-box;
}

#authyo-login-container h3 {
    margin: 0 0 12px 0;
    padding: 0;
    color: #1d2327;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
}

#authyo-login-container .authyo-description {
    margin: 0 0 16px 0;
    padding: 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.5;
}

#authyo-login-container p {
    margin: 0 0 16px 0;
    padding: 0;
}

/* Add bottom margin to Send OTP button container */
#authyo-login-container #authyo-email-step p:last-child {
    margin-bottom: 20px;
}

/* Add bottom margin directly to Send OTP button */
#authyo-login-container #authyo-send-otp-btn {
    margin-bottom: 20px;
}

/* Ensure email step container has bottom spacing */
#authyo-login-container #authyo-email-step {
    padding-bottom: 20px;
    margin-bottom: 0;
}

#authyo-login-container label {
    display: block;
    margin-bottom: 4px;
    font-weight: 400;
    color: #1d2327;
    font-size: 14px;
    line-height: 1.5;
}

#authyo-login-container input[type="email"],
#authyo-login-container input[type="text"] {
    width: 100%;
    padding: 0 8px;
    font-size: 14px;
    line-height: 2;
    border: 1px solid #8c8f94;
    border-radius: 0;
    box-shadow: 0 0 0 transparent;
    transition: border-color 0.05s ease-in-out;
    box-sizing: border-box;
}

#authyo-login-container input[type="email"]:focus,
#authyo-login-container input[type="text"]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

#authyo-login-container .button {
    width: 100%;
    margin: 0;
    padding: 0 12px 2px;
    font-size: 13px;
    line-height: 2.15384615;
    min-height: 30px;
    border-radius: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

/* Override margin for Send OTP button specifically */
#authyo-login-container #authyo-send-otp-btn {
    margin-bottom: 20px !important;
}

#authyo-login-container #authyo-otp-step p:last-child {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

#authyo-login-container #authyo-otp-step .button {
    flex: 1;
    width: auto;
}

#authyo-login-container .button-large {
    padding: 0 12px 2px;
    font-size: 14px;
    line-height: 2.15384615;
    min-height: 36px;
}

#authyo-login-container #authyo-otp-step .button {
    display: inline-block;
    width: auto;
    margin-right: 8px;
}

#authyo-login-container #authyo-otp-step .button:last-child {
    margin-right: 0;
}

#authyo-login-container .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

#authyo-login-container .button-primary:hover,
#authyo-login-container .button-primary:focus {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

#authyo-login-container .button:not(.button-primary) {
    background: #f6f7f7;
    border-color: #dcdcde;
    color: #2c3338;
}

#authyo-login-container .button:not(.button-primary):hover,
#authyo-login-container .button:not(.button-primary):focus {
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #1d2327;
}

#authyo-login-container button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#authyo-email-display {
    padding: 8px 12px;
    margin-bottom: 16px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 0;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

#authyo-messages {
    margin-top: 16px;
    margin-bottom: 0;
}

#authyo-messages:empty {
    display: none;
}

#authyo-messages .notice,
#authyo-messages .error,
#authyo-messages .success {
    padding: 12px;
    margin: 0 0 16px 0;
    border-left: 4px solid;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    font-size: 13px;
    line-height: 1.5;
}

#authyo-messages .notice {
    border-left-color: #2271b1;
    background: #f0f6fc;
}

#authyo-messages .error {
    border-left-color: #d63638;
    background: #fcf0f1;
}

#authyo-messages .success {
    border-left-color: #00a32a;
    background: #f0f6fc;
}

#authyo-messages p {
    margin: 0;
    padding: 0;
}

/* Timer and Resend OTP styles */
#authyo-timer-wrapper {
    margin: 10px 0;
    text-align: center;
}

#authyo-timer-display {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #2271b1;
    background: #f0f6fc;
    border: 1px solid #c3c4c7;
    border-radius: 0;
}

#authyo-resend-otp-btn {
    display: inline-block;
    width: auto;
    margin: 0;
}

/* Google Authenticator TOTP form */
#authyo-2fasdk {
    margin-top: 8px;
}

#authyo-2fasdk #ga-fallback-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    text-align: center;
    margin-bottom: 16px !important;
}

#authyo-2fasdk .authyo-totp-form {
    margin-top: 4px;
}

#authyo-2fasdk .authyo-msg {
    margin-top: 10px;
}

#authyo-2fasdk .authyo-msg .error {
    color: #d63638;
    font-size: 13px;
    margin: 0;
}

#authyo-2fasdk .authyo-msg .success {
    color: #00a32a;
    font-size: 13px;
    margin: 0;
}

#authyo-2fasdk .authyo-msg .info {
    color: #646970;
    font-size: 13px;
    margin: 0;
}

#authyo-totp-input {
    width: 100%;
    padding: 10px !important;
    font-size: 22px !important;
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 12px;
    box-sizing: border-box;
    border: 1px solid #8c8f94;
    border-radius: 0;
    display: block;
}

#authyo-totp-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

#authyo-totp-verify-btn {
    display: block;
    width: 100%;
}

#authyo-back-to-email {
    display: block;
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    #authyo-login-wrapper {
        max-width: 100%;
    }
    
    #authyo-login-container {
        padding: 20px 20px 34px 20px;
    }
    
    #authyo-login-container #authyo-email-step p:last-child,
    #authyo-login-container #authyo-otp-step p:last-child {
        margin-bottom: 20px;
    }
    
    #authyo-login-container .button {
        margin-bottom: 10px;
    }
    
    #authyo-login-container .button:last-child {
        margin-bottom: 0;
    }
}

