/**
 * Account sign-in pages: login / register, lost password, reset password, reset
 * link sent (woocommerce/myaccount/form-login.php, form-lost-password.php,
 * form-reset-password.php, lost-password-confirmation.php).
 *
 * Moved from the om-woo-rewards plugin (assets/css/frontend.css, "Auth pages")
 * so these pages keep their design when that plugin is off. Theme class names
 * (djmx-auth-*), so the plugin's copy of these rules no longer applies.
 * Behaviour: assets/js/account-auth.js. Loaded on My Account pages for
 * visitors who are not signed in (inc/woocommerce/account.php).
 *
 * @package wrish-child
 */

.djmx-auth {
    --auth-ink: #171717;
    --auth-ink-2: #555b63;
    --auth-ink-3: #555b63;
    --auth-line: #d5dbe3;
    --auth-bg-2: #f5f6f8;
    --auth-earn: #067647;
    --auth-err: #d92d20;
    --auth-blue: #0060ef;

    position: relative;
    overflow: hidden;
    padding: 56px 32px;
    min-height: 560px;
    display: flex;
    align-items: center;
    margin: 8px 0 24px;
    font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px; /* Nothing on these pages is smaller than 15px. */
    line-height: 1.5;
    color: var(--auth-ink);
    -webkit-font-smoothing: antialiased;
}

.djmx-auth::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 45%, rgba(0, 0, 0, 0.18));
    pointer-events: none;
}

.djmx-auth-inner {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

.djmx-auth-card {
    background: #fff;
    border-radius: 10px;
    padding: 44px 40px 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.djmx-auth-card h1 {
    margin: 0 0 6px;
    font-family: inherit;
    font-size: 28px;
    line-height: 36px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--auth-ink);
}

.djmx-auth-sub {
    margin: 0 0 28px;
    font-size: 15px;
    line-height: 22px;
    color: var(--auth-ink-2);
}

.djmx-auth-view--register {
    display: none;
}

.djmx-auth-card.is-register .djmx-auth-view--login {
    display: none;
}

.djmx-auth-card.is-register .djmx-auth-view--register {
    display: block;
}

.djmx-auth form .form-row {
    margin: 0 0 18px;
    padding: 0;
    width: 100%;
    float: none;
}

.djmx-auth form .form-row label {
    display: block;
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 21px;
    font-weight: 500;
    color: var(--auth-ink);
}

.djmx-auth form .form-row .required {
    color: var(--auth-err);
    text-decoration: none;
    border: 0;
}

.djmx-auth-optional {
    font-weight: 400;
    color: var(--auth-ink-3);
}

.djmx-auth form .form-row input.input-text {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--auth-line);
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
    font-family: inherit;
    font-size: 16px; /* 16px also stops phones zooming in on focus */
    color: var(--auth-ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.djmx-auth form .form-row input.input-text::placeholder {
    color: #a3adb8;
}

.djmx-auth form .form-row input.input-text:focus {
    outline: none;
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 3px #eef4ff;
}

.djmx-auth .password-input {
    position: relative;
    display: block;
    width: 100%;
}

.djmx-auth .password-input input {
    padding-right: 48px;
}

.djmx-auth .show-password-input {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    font-size: 0;
    line-height: 0;
    border-radius: 50%;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23555b63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}

.djmx-auth .show-password-input:hover {
    background-color: var(--auth-bg-2);
}

.djmx-auth .show-password-input.display-password {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94'/%3E%3Cpath d='M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19'/%3E%3Cpath d='M14.12 14.12a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

.djmx-auth .show-password-input::before,
.djmx-auth .show-password-input::after {
    content: none !important;
    display: none !important;
}

.djmx-auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 4px 0 24px;
}

.djmx-auth-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 15px;
    line-height: 21px;
    color: var(--auth-ink-2);
    cursor: pointer;
}

.djmx-auth-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--auth-blue);
}

.djmx-auth-link {
    font-size: 15px;
    line-height: 21px;
    font-weight: 500;
    color: var(--auth-blue);
    text-decoration: none;
}

.djmx-auth-link:hover {
    text-decoration: underline;
    color: var(--auth-blue);
}

.djmx-auth-submit {
    margin: 0;
}

.djmx-auth-btn {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 999px;
    background: var(--auth-blue);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: background 0.15s;
}

.djmx-auth-btn:hover,
.djmx-auth-btn:focus-visible {
    background: #333;
    color: #fff;
}

.djmx-auth-arr {
    transition: transform 0.15s;
}

.djmx-auth-btn:hover .djmx-auth-arr {
    transform: translateX(4px);
}

.djmx-auth-switch {
    margin: 24px 0 0;
    font-size: 15px;
    line-height: 22px;
    color: var(--auth-ink-2);
    text-align: center;
}

.djmx-auth-switch a {
    color: var(--auth-blue);
    font-weight: 600;
    border-bottom: 0;
    text-decoration: none;
}

.djmx-auth-switch a:hover {
    text-decoration: underline;
}

.djmx-perk-note {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--auth-bg-2);
    font-size: 15px;
    line-height: 22px;
    color: var(--auth-ink-2);
}

.djmx-perk-note b {
    font-weight: 600;
    color: var(--auth-ink);
}

.djmx-auth-note,
.djmx-auth .woocommerce-privacy-policy-text,
.djmx-auth .woocommerce-privacy-policy-text p {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 22px;
    color: var(--auth-ink-2);
}

.djmx-auth .woocommerce-privacy-policy-text a {
    color: var(--auth-blue);
}

.djmx-reqs {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: -6px 0 18px;
    padding: 0;
    font-size: 15px;
    line-height: 21px;
    color: var(--auth-ink-3);
}

.djmx-reqs li {
    position: relative;
    margin: 0;
    padding-left: 22px;
}

.djmx-reqs li::before {
    content: "○";
    position: absolute;
    left: 0;
}

.djmx-reqs li.ok {
    color: var(--auth-earn);
}

.djmx-reqs li.ok::before {
    content: "✓";
    font-weight: 600;
}

.djmx-auth-card--success {
    text-align: center;
}

.djmx-auth-success-ic {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ecfdf3;
    color: var(--auth-earn);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 18px;
}

.djmx-auth-card--success h2 {
    margin: 0 0 8px;
    font-family: inherit;
    font-size: 22px;
    line-height: 30px;
    font-weight: 600;
    text-transform: none;
}

.djmx-auth-success-text {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 23px;
    color: var(--auth-ink-2);
}

.djmx-auth-btn-line {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: var(--auth-ink);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.djmx-auth-btn-line:hover {
    border-color: #c4ccd6;
    background: var(--auth-bg-2);
    color: var(--auth-ink);
}

.djmx-auth-resend {
    margin: 16px 0 0;
    font-size: 15px;
    line-height: 22px;
    color: var(--auth-ink-2);
}

.djmx-auth-resend a {
    font-weight: 600;
    color: var(--auth-blue);
}

/* Short hint under the mobile field: phones only (the tip box above is hidden there) */
.djmx-auth-hint {
    display: none;
}

/* Phones: an app-style sheet — white page, no floating card, tighter rhythm so the
   whole form fits on one screen. Text stays at 15px or more. */
@media (max-width: 720px) {
    .woocommerce-account:not(.logged-in) .bwp-main {
        background: #fff;
    }

    .djmx-auth {
        display: block;
        min-height: 0;
        margin: 0;
        padding: 20px 4px 32px;
    }

    .djmx-auth::after {
        content: none;
    }

    .djmx-auth-card {
        max-width: none;
        padding: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .djmx-auth-card h1 {
        margin: 0 0 4px;
        font-size: 24px;
        line-height: 30px;
    }

    .djmx-auth-sub {
        margin: 0 0 20px;
    }

    .djmx-perk-note {
        display: none;
    }

    .djmx-auth-hint {
        display: block;
        margin: 6px 0 0;
        font-size: 15px;
        line-height: 20px;
        color: var(--auth-ink-2);
    }

    .djmx-auth form .form-row {
        margin: 0 0 14px;
    }

    .djmx-auth form .form-row label {
        margin: 0 0 6px;
    }

    .djmx-auth form .form-row input.input-text {
        height: 46px;
    }

    .djmx-auth-row {
        margin: 0 0 18px;
    }

    .djmx-auth-note,
    .djmx-auth .woocommerce-privacy-policy-text,
    .djmx-auth .woocommerce-privacy-policy-text p {
        margin: 0 0 14px;
    }

    .djmx-auth-btn {
        height: 48px;
    }

    .djmx-auth-switch {
        margin: 16px 0 0;
    }
}
