/* CSS for the login/register popup */
.ca-ajax-login-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999999999999;
}

#register-form h3,
#password-lost-form h3,
.ca-login-forms h2 {
    font-size: 26px;
    line-height: 1;
    margin: 10px auto 20px;
    font-weight: bold;
}

.ca-ajax-login-form-container {
    min-width: 500px;
    width: 500px;
    position: relative;
}

.ca-ajax-login-popup .ca-login-forms {
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ca-ajax-login-form-container label {
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.ca-ajax-login-form-container form input[type="text"],
.ca-ajax-login-form-container form input[type="email"],
.ca-ajax-login-form-container form input[type="password"] {
    min-height: 48px;
    width: 100%;
    padding: 10px;
    border: 1px solid black;
    border-radius: 8px;
    min-width: 350px;
}

#lostpasswordform p label {
    flex-direction: column;
    align-items: flex-start;
    width: 350px;
    max-width: 350px;
}

#signupform {
    max-width: 350px;
    width: 350px;
}

.ca-login-forms form p.signup-submit {
    margin-bottom: 20px;
}

a#back-to-login-link {
    display: flex;
    margin: 25px auto 10px;
    text-align: center;
    justify-content: center;
    align-items: center;
}

#password-lost-form p {
    max-width: 350px;
    text-align: center;
}

#password-lost-form p,
.ca-login-forms form p {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.3;
}

.ca-login-forms form .error {
    color: #ff0000;
    margin-bottom: 10px;
}

.ca-login-form-error {
    color: #ff0000;
    margin-bottom: 10px;
    font-size: 14px;
}

.ca-login-form-info {
    color: #2f973e;
    margin-bottom: 10px;
    max-width: 350px;
    width: 350px;
    text-align: center;
}

.ca-ajax-login-toggle-form-container {
    text-align: center;
    margin-top: 10px;
}

.ca-ajax-login-toggle-form:hover {
    text-decoration: unset;
}
.ca-ajax-login-toggle-form {
    color: black;
    text-decoration: underline;
}
.ca-ajax-login-toggle-form {
    margin: 15px auto;
}
.ca-login-social-btns a {
    border: 1px solid black;
    padding: 10px;
    min-width: calc(50% - 5px);
    white-space: pre;
    display: flex;
    justify-content: center;
    text-align: center;
    border-radius: 50px;
    margin: 0;
    font-size: 12px;
    text-decoration: unset;
    transition: .3s;
}
a.ca-fb {
    border-color: #2750A9;
    color: #2750A9;
}
a.ca-fb:hover {
    background: #2750A9;
    color: white;
}
a.ca-g {
    border-color: #0F780D;
    color: #0F780D;
}
a.ca-g:hover {
    background: #0F780D;
    color: white;
}

.ca-login-social-btns {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 5px;
    margin-bottom: 20px;
}

.ca-login-social-btns-wrapper h4 {
    width: 100%;
    text-align: center;
    font-size: 14px;
    line-height: 1;
    margin: 10px auto;
}

.ca-login-social-btns-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 350px;
    justify-content: space-between;
    flex-wrap: wrap;
}
.ca-ajax-login-popup form input[type=submit], .ca-ajax-login-popup .ca-login-forms form input[type=submit] {
    min-width: 100%;
}
form p {
    display: flex;
    flex-direction: column;
}
.ca-ajax-login-toggle-form:hover {
    text-decoration: underline;
}

/* Close button */
.ca-ajax-login-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
}
.ca-title-page {
    display: block;
    margin: 100px auto 20px;
    text-align: center;
}
.centered-p {
    opacity: .5;
    display: block;
    text-align: center;
    margin: 0 auto 20px;
}
/* Loader */
.ca-ajax-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 9999;
}

.ca-ajax-login-nooverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.ca-ajax-login-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #ffffff;
    border-top-color: #999999;
    border-radius: 50%;
    animation: ca-ajax-login-loader-spin 1s infinite linear;
}

@keyframes ca-ajax-login-loader-spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.ca-login-checkmark {
    position: absolute;
    top: 34%;
    left: 48%;
}

/*checkmark*/
.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #7ac142;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.ca-login-checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #7ac142;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #7ac142;
    }
}
.ca-page-forms {
    min-width: 100%;
    width: 100%;
    padding: 0 10% 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ca-ajax-login-popup-close:hover {
    opacity: .6;
}
.ca-ajax-login-popup-close {
    transition: .3s;
    color: black;
    font-size: 26px;
    top: 10px;
    right: 20px;
}
.ca-ajax-login-popup form input[type="submit"], .ca-login-forms form input[type="submit"] {
    transition: .3s;
}
.ca-ajax-login-button{
    cursor: pointer;
}
/* Honeypot fields - visually hidden from real users, visible to bots */
.ca-hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    width: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/*media queries*/
@media only screen and (max-width: 540px) {
    .ca-ajax-login-popup .ca-login-forms {
        padding: 40px 20px 20px;
        border-radius: 16px;
    }
    .ca-ajax-login-form-container {
        min-width: 90%;
        width: 90%;
        margin: 0 auto;
        padding-bottom: 100px;
    }
    .ca-login-social-btns br {
        display: none;
    }
    .ca-login-social-btns a {
        min-width: 100%;
        width: 100%;
    }
    .ca-login-social-btns {
        flex-direction: column;
        gap: 10px;
    }
    .ca-login-social-btns-wrapper,
    #lostpasswordform p label, #signupform, #password-lost-form p, #lostpasswordform p label, #signupform, #password-lost-form p,
    .ca-ajax-login-form-container form input[type="text"],
    .ca-ajax-login-form-container form input[type="email"],
    .ca-ajax-login-form-container form input[type="password"] {
        width: 300px;
        max-width: 300px;
        min-width: 300px;
    }
    .ca-ajax-login-popup-close {
        top: 0;
        right: 30px;
    }
}
@media only screen and (max-width: 350px) {
    .ca-login-social-btns-wrapper,
    #lostpasswordform p label, #signupform, #password-lost-form p, #lostpasswordform p label, #signupform, #password-lost-form p,
    .ca-ajax-login-form-container form input[type="text"],
    .ca-ajax-login-form-container form input[type="email"],
    .ca-ajax-login-form-container form input[type="password"] {
        width: 260px;
        max-width: 260px;
        min-width: 260px;
    }
}
/* ------------------------------------------------------------------
   2.0 additions
   ------------------------------------------------------------------ */
.ca-login-form-error[hidden],
.ca-login-form-info[hidden],
#form-response[hidden] {
    display: none;
}

body.ca-ajax-login-open {
    overflow: hidden;
}

.ca-ajax-login-popup {
    overflow-y: auto;
}

.ca-ajax-login-popup > .ca-ajax-login-form-container {
    margin: auto;
}

.ca-ajax-login-popup.is-busy .ca-ajax-login-popup-content {
    opacity: .5;
    pointer-events: none;
}

/* In-place busy state for every form (popup or page) */
.ca-login-forms,
.ca-login-account {
    position: relative;
}

.ca-login-forms.is-busy > *:not(.ca-login-success),
.ca-login-account.is-busy > *:not(.ca-login-success) {
    opacity: .35;
    pointer-events: none;
}

.ca-login-forms.is-busy:not(:has(.ca-login-success))::after,
.ca-login-account.is-busy:not(:has(.ca-login-success))::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 4px solid #ddd;
    border-top-color: #666;
    border-radius: 50%;
    animation: ca-login-spin 0.9s linear infinite;
}

@keyframes ca-login-spin {
    to {
        transform: rotate(360deg);
    }
}

.ca-login-success {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .85);
    border-radius: inherit;
}

.ca-login-success .ca-login-checkmark {
    position: static;
    margin: 0;
}

/* Social buttons: Apple */
a.ca-a {
    border-color: #000;
    color: #000;
}

a.ca-a:hover {
    background: #000;
    color: #fff;
}

/* Account form */
.ca-login-account {
    max-width: 420px;
    margin: 0 auto;
}

.ca-login-account label {
    display: block;
    margin: 12px 0 4px;
    font-size: 13px;
}

.ca-login-account input[type="text"],
.ca-login-account input[type="email"],
.ca-login-account input[type="password"] {
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid #000;
    border-radius: 8px;
    box-sizing: border-box;
}

.ca-login-account small {
    display: block;
    margin-top: 4px;
    opacity: .7;
}

.ca-login-account input[type="submit"] {
    margin-top: 20px;
}

#ca-login-ma-img {
    text-align: center;
    margin-bottom: 10px;
}

#ca-login-ma-img img {
    width: 96px;
    height: auto;
}

#form-response {
    margin-top: 12px;
    text-align: center;
}

/* Users list badges (wp-admin) */
.ca-user-source {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    background: #f0f0f1;
    font-size: 12px;
}

/* Popup card: one explicit width so the close button sits on the real corner */
.ca-ajax-login-popup > .ca-ajax-login-form-container {
    width: min(580px, 94%);
    min-width: 0;
}

.ca-ajax-login-popup .ca-login-forms {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* reCAPTCHA invisible / v3: the marker takes no space; branding text when the badge is hidden */
.ca-recaptcha--v2_invisible,
.ca-recaptcha--v3 {
    height: 0;
    margin: 0;
}

.ca-recaptcha-legal {
    max-width: 350px;
    margin: 8px auto;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
    opacity: .7;
}

/* Toast (replaces alert()) */
.ca-ajax-login-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1000000000000000;
    max-width: min(480px, 92vw);
    padding: 12px 18px;
    transform: translateX(-50%);
    color: #fff;
    background: #1d2327;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    font-size: 14px;
    line-height: 1.4;
}
