/**
 * AM Toolkit — account password and onboarding flow.
 */

body:has(.amt-account-flow) {
    overflow: hidden;
}

.amt-account-flow,
.amt-account-flow * {
    box-sizing: border-box;
}

.amt-account-flow {
    position: fixed;
    inset: 0;
    z-index: 2147482500;
    display: grid;
    place-items: center;
    padding: 28px 18px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 50% 35%, rgba(241, 118, 164, 0.14), transparent 38%),
        rgba(47, 35, 28, 0.58);
    backdrop-filter: blur(8px);
    font-family: Poppins, sans-serif;
}

.amt-account-flow__card {
    width: min(100%, 610px);
    margin: auto;
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid #d9d9d9;
    border-radius: 25px;
    background: #fff;
    color: #33271f;
    box-shadow: 0 24px 70px rgba(44, 30, 24, 0.2);
    animation: amt-account-flow-in 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.amt-account-flow__card--wide {
    width: min(100%, 720px);
}

.amt-account-flow__eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #f176a4;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.amt-account-flow__title {
    margin: 0 0 12px;
    color: #33271f;
    font-family: Poppins, sans-serif;
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 600;
    line-height: 1.16;
}

.amt-account-flow__intro {
    margin: 0 0 28px;
    color: #686868;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
}

.amt-account-flow__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.amt-account-flow__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.amt-account-flow__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amt-account-flow__field label {
    color: #33271f;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.amt-account-flow__field label > span:not(.amt-account-flow__optional) {
    color: #f176a4;
}

.amt-account-flow__field input {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 14px;
    background: #fff;
    color: #33271f;
    font: 400 15px/1.4 Poppins, sans-serif;
    outline: none;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.amt-account-flow__field input:hover {
    border-color: #bdbdbd;
}

.amt-account-flow__field input:focus {
    border-color: #f176a4;
    box-shadow: 0 0 0 3px rgba(241, 118, 164, 0.15);
}

.amt-account-flow__field small {
    color: #777;
    font-size: 12px;
    line-height: 1.45;
}

.amt-account-flow__optional {
    margin-left: 5px;
    color: #8a8a8a;
    font-size: 12px;
    font-weight: 400;
}

.amt-account-flow__password-wrap {
    position: relative;
}

.amt-account-flow__password-wrap input {
    padding-right: 78px;
}

button.amt-account-flow__reveal {
    position: absolute;
    top: 50%;
    right: 12px;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 4px 6px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 5px !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #f176a4 !important;
    font: 600 11px/1 Poppins, sans-serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transform: translateY(-50%);
}

button.amt-account-flow__reveal:hover,
button.amt-account-flow__reveal:active {
    border: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #d85f8d !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
}

.amt-account-flow__reveal:focus-visible {
    outline: 2px solid #f176a4;
    outline-offset: 2px;
    border-radius: 5px;
}

.amt-password-strength {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    color: #777;
    font-size: 12px;
}

.amt-password-strength::before {
    content: "";
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: #ededed;
}

.amt-password-strength__bar {
    grid-column: 1;
    grid-row: 1;
    z-index: 1;
    width: var(--amt-password-strength, 0%);
    height: 5px;
    border-radius: 999px;
    background: var(--amt-password-color, #d9d9d9);
    transition: width 180ms ease, background-color 180ms ease;
}

.amt-password-strength__label {
    grid-column: 2;
    grid-row: 1;
    min-width: 82px;
    text-align: right;
}

.amt-account-flow__email {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #faf6f3;
    color: #686868;
    font-size: 13px;
    line-height: 1.45;
}

.amt-account-flow__email strong {
    color: #33271f;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.amt-account-flow__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 12px 24px;
    border: 0;
    border-radius: 999px;
    background: #f176a4;
    color: #fff;
    font: 600 15px/1.3 Poppins, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(241, 118, 164, 0.25);
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.amt-account-flow__submit:hover {
    background: #d85f8d;
    color: #fff;
    box-shadow: 0 13px 30px rgba(216, 95, 141, 0.3);
    transform: translateY(-1px);
}

.amt-account-flow__submit:focus-visible {
    outline: 3px solid rgba(241, 118, 164, 0.35);
    outline-offset: 3px;
}

.amt-account-flow .woocommerce-notices-wrapper,
.amt-account-flow .woocommerce-error,
.amt-account-flow .woocommerce-message,
.amt-account-flow .woocommerce-info {
    margin: 0 0 20px;
}

.amt-account-flow .woocommerce-error,
.amt-account-flow .woocommerce-message,
.amt-account-flow .woocommerce-info {
    padding: 14px 16px !important;
    border: 1px solid #e4e4e4;
    border-radius: 14px;
    background: #fafafa;
    font: 400 13px/1.55 Poppins, sans-serif;
    list-style: none;
}

.amt-account-flow .woocommerce-error::before,
.amt-account-flow .woocommerce-message::before,
.amt-account-flow .woocommerce-info::before,
.amt-account-flow .woocommerce-error li::before,
.amt-account-flow .woocommerce-message li::before,
.amt-account-flow .woocommerce-info li::before {
    content: none !important;
    display: none !important;
}

.amt-account-flow .woocommerce-error {
    border-color: rgba(201, 77, 77, 0.28);
    background: #fff5f5;
    color: #a63e3e;
}

@keyframes amt-account-flow-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .amt-account-flow {
        place-items: start center;
        padding: 16px 12px;
    }

    .amt-account-flow__card {
        padding: 28px 20px;
        border-radius: 22px;
    }

    .amt-account-flow__grid {
        grid-template-columns: 1fr;
    }

    .amt-account-flow__email {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .amt-account-flow__card {
        animation: none;
    }

    .amt-account-flow *,
    .amt-account-flow *::before,
    .amt-account-flow *::after {
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}
