/* =========================================================
   EveryRep Account Modal
   ========================================================= */

html.everyrep-account-modal-open,
body.everyrep-account-modal-open {
    overflow: hidden;
}

.everyrep-account-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.19);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.everyrep-account-modal.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.everyrep-account-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 26px 30px 30px;
    border: 1px solid #e2e2df;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.16);
    transform: translateY(8px) scale(0.98);
    transition: transform 0.22s ease;
}

.everyrep-account-modal.is-visible .everyrep-account-modal__dialog {
    transform: translateY(0) scale(1);
}

.everyrep-account-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f3f1;
    cursor: pointer;
    transition: background 0.18s ease;
}

.everyrep-account-modal__close:hover {
    background: #e9e9e6;
}

.everyrep-account-modal__close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 13px;
    height: 1.5px;
    background: #222;
    transform-origin: center;
}

.everyrep-account-modal__close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.everyrep-account-modal__close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.everyrep-account-modal__segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    margin: 4px 54px 24px 0;
    border-radius: 12px;
    background: #f2f2f0;
}

.everyrep-account-modal__segment-button {
    min-height: 38px;
    padding: 8px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #6b6b6b;
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.everyrep-account-modal__segment-button.is-active {
    background: #fff;
    color: #111;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 1px rgba(0, 0, 0, 0.04);
}

.everyrep-account-modal__view,
.everyrep-account-modal__panel {
    display: none;
}

.everyrep-account-modal__view.is-active,
.everyrep-account-modal__panel.is-active {
    display: block;
}

.everyrep-account-modal__heading {
    margin-bottom: 26px;
}

.everyrep-account-modal__heading h2,
.everyrep-account-success h2 {
    margin: 0 0 9px;
    color: #111;
    font-size: 24px;
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.everyrep-account-modal__heading p,
.everyrep-account-success p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.everyrep-account-form__field {
    margin-bottom: 18px;
}

.everyrep-account-form__field label {
    display: block;
    margin-bottom: 7px;
    color: #222;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
}

.everyrep-account-form__field input {
    width: 100%;
    height: 50px;
    box-sizing: border-box;
    padding: 0 15px;
    border: 1px solid #d8d8d4;
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: #111;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.everyrep-account-form__field input:focus {
    border-color: #555;
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08);
}

.everyrep-account-form__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.everyrep-account-form__label-row a {
    margin-bottom: 7px;
    color: #444;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
    text-decoration: none;
}

.everyrep-account-form__label-row a:hover {
    color: #111;
}

.everyrep-account-form__password-wrap {
    position: relative;
}

.everyrep-account-form__password-wrap input {
    padding-right: 66px;
}

.everyrep-account-form__password-toggle {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    padding: 4px;
    border: 0;
    background: transparent;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.everyrep-account-form__remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 20px;
    color: #555;
    font-size: 12px;
    cursor: pointer;
}

.everyrep-account-form__remember input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1px solid #b8b8b4;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.everyrep-account-form__remember input:hover {
    border-color: #777;
}

.everyrep-account-form__remember input:focus-visible {
    outline: none;
    border-color: #555;
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08);
}

.everyrep-account-form__remember input:checked {
    border-color: #111;
    background: #111;
}

.everyrep-account-form__remember input:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.everyrep-account-form__submit {
    position: relative;
    width: 100%;
    min-height: 50px;
    padding: 12px 18px;
    border: 1px solid #111;
    border-radius: 11px;
    background: #111;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.17s ease, opacity 0.17s ease, transform 0.12s ease;
}

.everyrep-account-form__submit:hover {
    background: #262626;
}

.everyrep-account-form__submit:active {
    transform: scale(0.99);
}

.everyrep-account-form__submit.is-loading {
    pointer-events: none;
}

.everyrep-account-form__submit.is-loading .everyrep-account-form__button-label {
    opacity: 0;
}

.everyrep-account-form__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    display: none;
    width: 17px;
    height: 17px;
    margin: -8.5px 0 0 -8.5px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: everyrep-account-spinner 0.7s linear infinite;
}

.everyrep-account-form__submit.is-loading .everyrep-account-form__spinner {
    display: block;
}

@keyframes everyrep-account-spinner {
    to {
        transform: rotate(360deg);
    }
}

.everyrep-account-form__message {
    display: none;
    margin: 0 0 18px;
    padding: 11px 13px;
    border: 1px solid #e1c7c7;
    border-radius: 9px;
    background: #fff7f7;
    color: #7d2626;
    font-size: 12px;
    line-height: 1.45;
}

.everyrep-account-form__message.is-visible {
    display: block;
}


.everyrep-account-form__message.is-info {
    border-color: #d9d9d5;
    background: #f7f7f5;
    color: #444;
}


.everyrep-account-form__note {
    margin: -4px 0 20px;
    color: #777;
    font-size: 11px;
    line-height: 1.45;
}

.everyrep-account-modal__switch {
    margin-top: 22px;
    color: #777;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.everyrep-account-modal__switch button {
    padding: 0;
    border: 0;
    background: none;
    color: #111;
    font-family: inherit;
    font-size: inherit;
    font-weight: 650;
    cursor: pointer;
}

.everyrep-account-success {
    padding: 34px 4px 6px;
    text-align: center;
}

.everyrep-account-success__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #111;
    color: #fff;
}

.everyrep-account-success__icon svg {
    width: 24px;
    height: 24px;
}

.everyrep-account-success p {
    margin-bottom: 27px;
}

@media only screen and (max-width: 768px) {
    .everyrep-account-modal {
        padding: 16px;
    }

    .everyrep-account-modal__dialog {
        max-width: 360px;
        padding: 22px 22px 24px;
        border-radius: 20px;
    }

    .everyrep-account-modal__segment {
        margin-right: 50px;
        margin-bottom: 22px;
    }

    .everyrep-account-modal__heading h2,
    .everyrep-account-success h2 {
        font-size: 22px;
    }
}


/* =========================================================
   Logged-out My Account background cleanup
   On the base logged-out My Account page, the EveryRep modal
   owns the authentication experience. Remove the native
   WooCommerce account form from layout entirely so theme/
   plugin pseudo-elements (including required-field markers)
   cannot bleed through the blurred backdrop.
   ========================================================= */

body.everyrep-account-modal-page .woocommerce {
    display: none !important;
}

/*
 * Keep a clean page canvas behind the modal even though the
 * native WooCommerce account block has been removed.
 */
body.everyrep-account-modal-page #primary,
body.everyrep-account-modal-page .site-main,
body.everyrep-account-modal-page .content-area,
body.everyrep-account-modal-page .site-content {
    min-height: 70vh;
}

body.everyrep-account-modal-page .everyrep-account-modal {
    visibility: hidden;
}

body.everyrep-account-modal-page .everyrep-account-modal.is-visible {
    visibility: visible;
}

