/* Only guest access controls and extra native registration fields. */
.sdh-guest-icon-hidden {display:none!important;}
#user_menu_u.user_not_loged .sdh-header-login:not(.submit_listing),.mobile_header .sdh-header-login {width:auto;min-width:42px;cursor:pointer;white-space:nowrap;font:inherit;font-weight:600;}
.sdh-register-fields .form-control {margin-bottom:10px;}
.sdh-registration-message {color:#b42318;}
#modal_login_wrapper .login-register-modal-form-wrapper {overflow-y:auto;max-height:100%;}
#sdh-login-fallback {position:fixed;bottom:16px;left:16px;right:16px;max-width:460px;padding:14px;background:#fff;color:#222;border:1px solid #aaa;z-index:999999;box-shadow:0 2px 8px #0003;}
#sdh-login-fallback button {margin-left:10px;}

/* 2.1.1: Desktop native registration only. Extra contact fields must not
   overlap the theme's bottom-positioned authentication switch links. */
#modal_login_wrapper .modal_login_container.sdh-register-open {
    position:fixed!important;
    top:50%!important;
    left:50%!important;
    transform:translate(-50%,-50%)!important;
    margin:0!important;
    height:min(740px,calc(100vh - 32px))!important;
    max-height:calc(100vh - 32px)!important;
    max-height:calc(100dvh - 32px)!important;
    box-sizing:border-box;
}
#modal_login_wrapper .modal_login_container.sdh-register-open .login-register-modal-form-wrapper {
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    align-items:stretch!important;
    box-sizing:border-box;
    height:100%!important;
    max-height:100%!important;
    min-height:0!important;
    overflow-y:auto!important;
    padding-top:32px!important;
    padding-bottom:24px!important;
}
#modal_login_wrapper .modal_login_container.sdh-register-open .login-register-modal-form-wrapper > .wpestate_register_form_wrapper {
    position:static!important;
    transform:none!important;
    flex:0 0 auto!important;
    width:100%!important;
    height:auto!important;
    max-height:none!important;
    margin:0!important;
    box-sizing:border-box;
}
#modal_login_wrapper .modal_login_container.sdh-register-open .login-register-modal-form-wrapper > .login_modal_control {
    position:static!important;
    inset:auto!important;
    transform:none!important;
    flex:0 0 auto!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    flex-wrap:wrap!important;
    gap:8px 16px;
    width:100%!important;
    height:auto!important;
    margin:16px 0 0!important;
    padding:0!important;
    box-sizing:border-box;
}
#modal_login_wrapper .modal_login_container.sdh-register-open .login_modal_control > a {
    position:static!important;
    float:none!important;
    margin:0!important;
}
#modal_login_wrapper .modal_login_container.sdh-register-open #login-modal_close {z-index:5;}


/* SDH ANIMATED LOGIN BUTTON */
#user_menu_u.user_not_loged a.sdh-header-login.submit_listing {
    background-color: #ffffff !important;
    background-image: linear-gradient(#0075d9, #0075d9) !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    background-size: 0% 100% !important;
    border: 2px solid #0075d9 !important;
    color: #0075d9 !important;
    text-transform: none !important;
    box-sizing: border-box;
    transition: background-size 0.3s ease-in-out,
                color 0.3s ease-in-out !important;
}

#user_menu_u.user_not_loged a.sdh-header-login.submit_listing:hover,
#user_menu_u.user_not_loged a.sdh-header-login.submit_listing:focus-visible,
#user_menu_u.user_not_loged a.sdh-header-login.submit_listing:active {
    background-size: 100% 100% !important;
    color: #ffffff !important;
    border-color: #0075d9 !important;
}

@media (prefers-reduced-motion: reduce) {
    #user_menu_u.user_not_loged a.sdh-header-login.submit_listing {
        transition: none !important;
    }
}


/* SDH V2.1.4 - Correct legacy login button styling */

html body #user_menu_u.user_not_loged a.sdh-header-login.submit_listing {
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    box-sizing: border-box !important;

    background-color: #ffffff !important;
    background-image: linear-gradient(#0073e1, #0073e1) !important;
    background-size: 0% 100% !important;
    background-position: left center !important;
    background-repeat: no-repeat !important;

    border: 2px solid #0073e1 !important;
    color: #0073e1 !important;
    text-transform: none !important;
    text-decoration: none !important;
    text-shadow: none !important;
    font-weight: 600 !important;
    cursor: pointer !important;

    min-width: 114px !important;
    min-height: 40px !important;
    padding: 10px 30px !important;
    line-height: 1.2 !important;

    transition: background-size 300ms ease-in-out,
                color 300ms ease-in-out !important;
}

/* Remove the old fake LOGIN overlay */
html body #user_menu_u.user_not_loged a.sdh-header-login.submit_listing::after {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
}

html body #user_menu_u.user_not_loged a.sdh-header-login.submit_listing:hover,
html body #user_menu_u.user_not_loged a.sdh-header-login.submit_listing:focus-visible,
html body #user_menu_u.user_not_loged a.sdh-header-login.submit_listing:active {
    visibility: visible !important;
    background-color: #ffffff !important;
    background-size: 100% 100% !important;
    color: #ffffff !important;
    border-color: #0073e1 !important;
}

@media (prefers-reduced-motion: reduce) {
    html body #user_menu_u.user_not_loged a.sdh-header-login.submit_listing {
        transition: none !important;
    }
}
