.x-pill {
    font-size: 12px;
    font-weight: 700;
    border-radius: 0 0 8px 8px;
    padding: 6px 10px;
    color: #fff;
    line-height: 1;
}

.x-pill--red {
    background: var(--red);
}

.x-pill--gray {
    background: var(--graypill);
}

.x-pill--green {
    background: var(--green);
}

.x-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
    border-radius: 999px;
    height: 54px;
    padding: 0 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system;
}

.x-btn--white {
    background: #fff;
    color: #111827;
}

.x-btn--black {
    background: #111827;
    color: #fff;
}

.x-btn--gray {
    background: #edeff8;
    color: #000000;
}

.x-btn--ghost {
    background: #fff;
    color: #90a2b1;
    border-color: #90a2b1;
}

.x-btn__arrow {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== AUTH MODAL (single source of truth) ===== */

.x-modal {
    display: none;
}

.x-modal.is-open {
    display: block;
}

html.x-modal-open,
body.x-modal-open {
    /* overflow: hidden; */
    position: fixed;
    width: 100%;
}

.x-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 16, 28, 0.5);
    backdrop-filter: blur(8px);
    z-index: 9998;
}

.x-modal__panel {
    position: fixed;
    left: 50%;
    top: 70px;
    transform: translateX(-50%);
    width: min(670px, calc(100vw - 48px));
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 18px 60px rgba(16, 24, 40, 0.28);
    z-index: 9999;
    padding: 54px;
}

/* close button OUTSIDE top-right */
.x-modal__close {
    position: absolute;
    top: -24px;
    right: -24px;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    border: 0;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 34px rgba(16, 24, 40, 0.18);
    z-index: 10000;
}

.x-auth__body {
    padding: 0;
}

/* ===== Woo reset inside modal ===== */
#x-auth .woocommerce {
    margin: 0;
}

#x-auth .woocommerce .col2-set {
    display: block;
    margin: 0;
    width: 100%;
}

#x-auth .woocommerce .u-column1,
#x-auth .woocommerce .u-column2 {
    float: none;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* show only one column depending on mode */
#x-auth.is-register .woocommerce .u-column1 {
    display: none !important;
}

#x-auth.is-register .woocommerce .u-column2 {
    display: block !important;
}

#x-auth.is-login .woocommerce .u-column1 {
    display: block !important;
}

#x-auth.is-login .woocommerce .u-column2 {
    display: none !important;
}

/* hide Woo noise */
#x-auth .woocommerce label .required {
    display: none !important;
}

#x-auth .woocommerce .show-password-input {
    display: none !important;
}

#x-auth .woocommerce .woocommerce-password-strength,
#x-auth .woocommerce .woocommerce-password-hint {
    display: none !important;
}

#x-auth .woocommerce .woocommerce-privacy-policy-text {
    display: none !important;
}

#x-auth .woocommerce wc-order-attribution-inputs {
    display: none !important;
}

/* Center form */
#x-auth .woocommerce form.register,
#x-auth .woocommerce form.login {
    max-width: 760px;
    margin: 0 auto;
    border: 0;
    padding: 0;
    box-shadow: none;
}

/* Title */
#x-auth .woocommerce h2 {
    text-align: center !important;
    font-size: 26px !important;
    font-weight: 400 !important;
    margin: 0 0 34px !important;
    letter-spacing: -0.02em !important;
    color: #0b1220 !important;
}

/* ===== Field with floating label (54px height) ===== */
#x-auth .woocommerce form p.form-row {
    position: relative !important;
    margin: 0 0 22px !important;
    padding: 0 !important;
    float: none !important;
    width: 100% !important;
}

/* label перекрывает рамку */
#x-auth .woocommerce form p.form-row > label {
    position: absolute !important;
    left: 32px !important;
    top: -9px !important;
    padding: 0 10px !important;
    background: #fff !important;
    z-index: 2 !important;
    font-size: 16px !important;
    color: #606060 !important;
    line-height: 16px !important;
}

/* Inputs */
#x-auth .woocommerce form .woocommerce-Input,
#x-auth .woocommerce form input[type="text"],
#x-auth .woocommerce form input[type="email"],
#x-auth .woocommerce form input[type="tel"],
#x-auth .woocommerce form input[type="password"] {
    display: block !important;
    width: 100% !important;
    height: 54px !important;
    border-radius: 999px !important;
    border: 1px solid #606060 !important;
    background: #fff !important;

    /* текст по центру вертикально */
    padding: 22px !important;
    line-height: normal !important;

    font-size: 18px !important;
    color: #0b1220 !important;

    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
}

/* никаких подсветок/ореолов при фокусе */
#x-auth .woocommerce form .woocommerce-Input:focus,
#x-auth .woocommerce form input:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* placeholder не мешает “плавающему” лейблу */
#x-auth .woocommerce form input::placeholder {
    color: transparent !important;
}

#x-auth .woocommerce form .password-input {
    display: block !important;
}

#x-auth .woocommerce form .password-input input {
    height: 54px !important;
    padding: 22px !important;
}

/* ===== Validation: required -> red border ===== */
/* Woo adds .woocommerce-invalid + .woocommerce-invalid-required-field on rows */
#x-auth .woocommerce form p.form-row.woocommerce-invalid .woocommerce-Input,
#x-auth .woocommerce form p.form-row.woocommerce-invalid input,
#x-auth .woocommerce form p.form-row.woocommerce-invalid-required-field .woocommerce-Input,
#x-auth .woocommerce form p.form-row.woocommerce-invalid-required-field input {
    border-color: #fa4d62 !important;
}

/* also when browser marks field invalid */
#x-auth .woocommerce form input:invalid {
    border-color: #fa4d62;
}

/* ===== Register grid (only password pair 2 cols) ===== */
#x-auth .woocommerce form.register {
    display: block !important;
}

@supports (selector(:has(*))) {
    #x-auth .woocommerce form.register {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        column-gap: 24px !important;
        row-gap: 24px !important;
    }

    #x-auth .woocommerce form.register {
        align-items: start !important;
    }

    #x-auth .woocommerce form.register p.form-row {
        align-self: start !important;
    }

    #x-auth .woocommerce form.register .x-auth-switch {
        order: 40;
        grid-column: 1 / -1;
    }

    #x-auth .woocommerce form.register p.form-row:has(button[type="submit"]) {
        order: 30;
        grid-column: 1 / -1;
    }

    #x-auth .woocommerce form.register > * {
        order: 10;
    }

    /* default full width */
    #x-auth .woocommerce form.register p.form-row {
        grid-column: 1 / -1;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* password pair half width */
    #x-auth .woocommerce form.register p.form-row:has(input#reg_password) {
        grid-column: 1 / 2;
    }

    #x-auth .woocommerce form.register p.form-row:has(input#reg_password2) {
        grid-column: 2 / 3;
    }

    /* spacing "Повторите пароль"*/
    #x-auth .woocommerce form.register p.form-row:has(input#reg_password),
    #x-auth .woocommerce form.register p.form-row:has(input#reg_password2) {
        margin: 28px 0 !important;
    }
}

/* spacing between inputs and primary button */
#x-auth .woocommerce form.register button[type="submit"],
#x-auth .woocommerce form.login button[type="submit"] {
    margin: 28px 0 !important;
}

#x-auth .x-auth-switch__q {
    text-align: center;
    margin-bottom: 12px;
}

#x-auth .x-auth-switch__btn {
    width: 100%;
    height: 54px;
    border-radius: 999px;
    border: 1px solid #cfd6e1;
    background: #fff;
    color: #9aa3af;
    font-weight: 900;
    font-size: 18px;
    cursor: pointer;
}

#x-auth .x-auth-switch__btn:hover {
    background: #f6f8fb;
}

/* Primary button */
#x-auth .woocommerce button.button,
#x-auth .woocommerce input.button,
#x-auth .woocommerce button[type="submit"] {
    width: 100% !important;
    height: 54px !important;
    border-radius: 999px !important;
    border: 0 !important;
    background: #0b1220 !important;
    color: #fff !important;
    font-weight: 900 !important;
    font-size: 18px !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

/* === KILL AUTOFILL BACKGROUND (Chrome/Safari) === */
#x-auth .woocommerce form input:-webkit-autofill,
#x-auth .woocommerce form input:-webkit-autofill:hover,
#x-auth .woocommerce form input:-webkit-autofill:focus,
#x-auth .woocommerce form textarea:-webkit-autofill,
#x-auth .woocommerce form select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    background-color: #fff !important;
    -webkit-text-fill-color: #0b1220 !important;
    caret-color: #0b1220 !important;
}

/* === Firefox === */
#x-auth .woocommerce form input:-moz-autofill,
#x-auth .woocommerce form textarea:-moz-autofill,
#x-auth .woocommerce form select:-moz-autofill {
    box-shadow: 0 0 0 1000px #fff inset !important;
    background-color: #fff !important;
    -moz-text-fill-color: #0b1220 !important;
}

/* ===== Account notices (errors) ===== */
#x-auth .woocommerce .woocommerce-notices-wrapper {
    margin: 0 0 14px;
}

.woocommerce-account .woocommerce-notices-wrapper {
    margin: 0;
}

.woocommerce-account .woocommerce-notices-wrapper > * {
    margin: 0 0 24px;
    padding: 14px 18px;
    text-align: center;
    border-radius: 12px;
    box-shadow: none;
    outline: none;
}

/* убрать дефолтные иконки Woo */
.woocommerce-account .woocommerce-notices-wrapper > *::before {
    display: none !important;
    content: none !important;
}

/* error */
.woocommerce-account .woocommerce-notices-wrapper .woocommerce-error {
    list-style: none;
    border: 1px solid rgba(250, 77, 98, 0.2);
    background: rgba(250, 77, 98, 0.1);
    color: #fa4d62;
}

/* success */
.woocommerce-account .woocommerce-notices-wrapper .woocommerce-message {
    border: 1px solid rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.1);
    color: #01ba04;
}

.woocommerce-account .woocommerce-notices-wrapper .woocommerce-error li {
    margin: 0;
    padding: 6px 0;
    font-weight: 400; /* без жирного */
    line-height: 1.35;
}

.woocommerce-account .woocommerce-notices-wrapper .woocommerce-error li + li {
    border-top: 0 solid rgba(239, 68, 68, 0.14);
}

.woocommerce-account .woocommerce-notices-wrapper .woocommerce-error strong {
    font-weight: 400; /* убрать жирный акцент */
    color: inherit;
}

/* если Woo добавляет ::before и иконку */
.woocommerce-account .woocommerce-notices-wrapper .woocommerce-error::before {
    display: none;
}

/* ===== LOST PASSWORD PAGE ===== */

/* overlay выше всего сайта, включая header */
body.woocommerce-lost-password::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 16, 28, 0.5);
    backdrop-filter: blur(8px);
    z-index: 9998;
}

/* форма над overlay */
.woocommerce-lost-password .woocommerce {
    max-width: 670px;
    margin: 70px auto;
    padding: 0 24px;
    position: relative;
    z-index: 9999;
}

/* если хедер всплывает выше — опустить его */
.x-header {
    z-index: auto;
}

.woocommerce-lost-password .woocommerce h1,
.woocommerce-lost-password .woocommerce h2 {
    text-align: center !important;
    font-size: 26px !important;
    font-weight: 400 !important;
    margin: 0 0 34px !important;
    letter-spacing: -0.02em !important;
    color: #0b1220 !important;
}

.woocommerce-lost-password .woocommerce .woocommerce-form-row,
.woocommerce-lost-password .woocommerce .form-row,
.woocommerce-lost-password .woocommerce form p {
    position: relative !important;
    margin: 0 0 22px !important;
    padding: 0 !important;
    float: none !important;
    width: 100% !important;
}

.woocommerce-lost-password .woocommerce form p:first-of-type {
    text-align: center;
    color: #606060;
    font-size: 16px;
    line-height: 1.45;
    margin: 0 0 28px !important;
}

.woocommerce-lost-password .woocommerce label {
    position: absolute !important;
    left: 32px !important;
    top: -9px !important;
    padding: 0 10px !important;
    background: #fff !important;
    z-index: 2 !important;
    font-size: 16px !important;
    color: #606060 !important;
    line-height: 16px !important;
}

.woocommerce-lost-password .woocommerce label .required {
    display: none !important;
}

.woocommerce-lost-password .woocommerce .woocommerce-Input,
.woocommerce-lost-password .woocommerce input[type="text"],
.woocommerce-lost-password .woocommerce input[type="email"] {
    display: block !important;
    width: 100% !important;
    height: 54px !important;
    border-radius: 999px !important;
    border: 1px solid #606060 !important;
    background: #fff !important;
    padding: 22px !important;
    line-height: normal !important;
    font-size: 18px !important;
    color: #0b1220 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
}

.woocommerce-lost-password .woocommerce .woocommerce-Input:focus,
.woocommerce-lost-password .woocommerce input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.woocommerce-lost-password .woocommerce input::placeholder {
    color: transparent !important;
}

.woocommerce-lost-password .woocommerce button.button,
.woocommerce-lost-password .woocommerce input.button,
.woocommerce-lost-password .woocommerce button[type="submit"] {
    width: 100% !important;
    height: 54px !important;
    border-radius: 999px !important;
    border: 0 !important;
    background: #0b1220 !important;
    color: #fff !important;
    font-weight: 900 !important;
    font-size: 18px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    margin: 28px 0 0 !important;
}

.woocommerce-lost-password .woocommerce .woocommerce-notices-wrapper {
    margin: 0 0 14px;
}

.woocommerce-lost-password .woocommerce .woocommerce-notices-wrapper > * {
    margin: 0 0 24px;
    padding: 14px 18px;
    text-align: center;
    border-radius: 12px;
    box-shadow: none;
    outline: none;
}

.woocommerce-lost-password .woocommerce .woocommerce-notices-wrapper > *::before {
    display: none !important;
    content: none !important;
}

.woocommerce-lost-password .woocommerce .woocommerce-error {
    list-style: none;
    border: 1px solid rgba(250, 77, 98, 0.2);
    background: rgba(250, 77, 98, 0.1);
    color: #fa4d62;
}

.woocommerce-lost-password .woocommerce .woocommerce-message {
    border: 1px solid rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.1);
    color: #01ba04;
}

.woocommerce-lost-password .woocommerce .woocommerce-error li {
    margin: 0;
    padding: 6px 0;
    font-weight: 400;
    line-height: 1.35;
}

.woocommerce-lost-password .woocommerce .woocommerce-error strong {
    font-weight: 400;
    color: inherit;
}

.woocommerce-lost-password .woocommerce .woocommerce-error::before {
    display: none;
}

/* autofill */
.woocommerce-lost-password .woocommerce input:-webkit-autofill,
.woocommerce-lost-password .woocommerce input:-webkit-autofill:hover,
.woocommerce-lost-password .woocommerce input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    background-color: #fff !important;
    -webkit-text-fill-color: #0b1220 !important;
    caret-color: #0b1220 !important;
}

.woocommerce-lost-password .woocommerce input:-moz-autofill {
    box-shadow: 0 0 0 1000px #fff inset !important;
    background-color: #fff !important;
    -moz-text-fill-color: #0b1220 !important;
}

@media (max-width: 768px) {
    .woocommerce-lost-password .woocommerce {
        margin: 36px auto;
        padding: 0 16px;
    }

    .woocommerce-lost-password .woocommerce form.lost_reset_password {
        padding: 28px 20px;
        border-radius: 18px;
    }

    .woocommerce-lost-password .woocommerce h1,
    .woocommerce-lost-password .woocommerce h2 {
        font-size: 22px !important;
        margin: 0 0 26px !important;
    }

    .woocommerce-lost-password .woocommerce label {
        left: 22px !important;
        font-size: 14px !important;
    }

    .woocommerce-lost-password .woocommerce .woocommerce-Input,
    .woocommerce-lost-password .woocommerce input[type="text"],
    .woocommerce-lost-password .woocommerce input[type="email"],
    .woocommerce-lost-password .woocommerce button.button,
    .woocommerce-lost-password .woocommerce input.button,
    .woocommerce-lost-password .woocommerce button[type="submit"] {
        height: 50px !important;
        font-size: 16px !important;
    }
}

/* ===== LOST PASSWORD SUCCESS PAGE ===== */

body.woocommerce-lost-password {
    position: relative;
    min-height: 100vh;
}

body.woocommerce-lost-password::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 16, 28, 0.5);
    backdrop-filter: blur(8px);
    z-index: 9998;
}

body.woocommerce-lost-password .x-header {
    position: relative;
    z-index: 10;
}

body.woocommerce-lost-password .x-page {
    position: relative;
    padding: 70px 0;
}

body.woocommerce-lost-password .x-container {
    max-width: 670px;
    margin: 0 auto;
    padding: 0 24px;
}

body.woocommerce-lost-password .x-breadcrumbs,
body.woocommerce-lost-password .x-page-title {
    display: none;
}

body.woocommerce-lost-password .woocommerce {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 18px 60px rgba(16, 24, 40, 0.28);
    padding: 54px;
}

body.woocommerce-lost-password .woocommerce-message {
    margin: 0 0 24px !important;
    padding: 14px 18px !important;
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.1);
    color: #01ba04;
    box-shadow: none;
}

body.woocommerce-lost-password .woocommerce-message::before {
    display: none !important;
}

body.woocommerce-lost-password .woocommerce > p {
    margin: 0;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    color: #606060;
}

@media (max-width: 768px) {
    body.woocommerce-lost-password .x-page {
        padding: 36px 0;
    }

    body.woocommerce-lost-password .x-container {
        padding: 0 16px;
    }

    body.woocommerce-lost-password .woocommerce {
        padding: 28px 20px;
        border-radius: 18px;
    }

    body.woocommerce-lost-password .woocommerce > p {
        font-size: 15px;
        line-height: 1.5;
    }
}

.x-page {
    position: relative;
}

.x-page-close {
    position: fixed;
    top: 46px;
    right: 24px;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    text-decoration: none;
    font-size: 18px;
    line-height: 24px;
    text-align: center;
    box-shadow: 0 14px 34px rgba(16, 24, 40, 0.18);
    z-index: 10000;
}

@media (max-width: 768px) {
    .x-page-close {
        top: 18px;
        right: 18px;
    }
}
