/* ==========================================
   KRUMPLD — CREATE ACCOUNT / REGISTRATION
   Standalone shortcode page (/register/), not
   a WooCommerce template override -- native
   WooCommerce registration is disabled at the
   WooCommerce settings level, so this is the
   only account-creation path on the site.
   Markup lives in inc/registration.php
   ([krumpld_registration] shortcode); submit
   behavior and password-confirmation matching
   live in js/registration.js.
   Inputs use the underline style (border-bottom
   only), matching Profile (form-edit-account.php)
   and Sign In (krumpld-signin.css) -- not a
   bordered box.
   ========================================== */

.kr-registration {
    width: min(100% - 40px, 520px);
    margin: 0 auto;
    padding: 48px 0 64px;
}

.kr-registration__header {
    position: relative;
    margin-bottom: 40px;
    text-align: center;
}

.kr-registration__header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 500;
    color: #111;
}

.kr-registration__back {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    text-decoration: none;
    font-size: 18px;
    color: #999;
}

.kr-registration__back:hover {
    color: #111;
}

.kr-registration__form {
    display: grid;
    gap: 20px;
}

.kr-registration__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.kr-registration__field {
    display: grid;
    gap: 8px;
}

.kr-registration__field label {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #777;
}

/*
 * KRUMPLD MOD: underline style, not a bordered box -- matches the Profile
 * page and Sign In. -webkit-appearance/appearance reset defensively for
 * the same reason as krumpld-signin.css.
 *
 * Chained under .kr-registration .kr-registration__form for extra
 * specificity: a single .kr-registration__field input rule was still
 * losing to something (most likely Kadence's own generic form-input
 * styling in the parent theme, which isn't in the files available this
 * session to confirm directly). This uses three real, already-existing
 * classes from the actual markup rather than guessing at Kadence's
 * selector.
 */
.kr-registration .kr-registration__form .kr-registration__field input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 2px;
    font-size: 15px;
    border: none;
    border-bottom: 1px solid #d9d6d0;
    border-radius: 0;
    background: transparent;
    color: #111;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.kr-registration__input-wrap {
    position: relative;
}

.kr-registration__input-wrap input {
    padding-right: 32px;
}

.kr-registration__toggle-password {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
}

.kr-registration__toggle-password:hover {
    color: #111;
}

.kr-registration__toggle-password:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.kr-registration .kr-registration__form .kr-registration__field input:focus {
    outline: none;
    border-bottom-color: #111;
}

/*
 * No :focus-visible outline here on purpose -- see myaccount.css for the
 * full explanation (outline draws a box on all four sides, and browsers
 * apply :focus-visible to text inputs on click, not just keyboard).
 */

/*
 * KRUMPLD MOD: removed .kr-registration__hint (the static "At least 8
 * characters" text) -- superseded by the native WooCommerce strength
 * meter, which now injects its own accurate, dynamic hint text. Replaced
 * with styling for that meter's real output (.woocommerce-password-strength,
 * .woocommerce-password-hint). Background colors per state are the exact
 * values from WooCommerce's own core stylesheet (assets/css/woocommerce.css)
 * rather than invented ones. The 1px border is a deliberate addition, not
 * a verbatim copy -- WC's own CSS defines a border-color per state but
 * never actually sets a border-width/style, so no border renders in its
 * own default version; adding one here gives clearer definition against
 * the site's light background.
 */
.kr-registration .woocommerce-password-strength {
    text-align: center;
    font-weight: 600;
    padding: 3px 0.5em;
    font-size: 13px;
    margin: 8px 0 0;
    color: #111;
    border: 1px solid transparent;
}

.kr-registration .woocommerce-password-strength.strong {
    background-color: #c1e1b9;
    border-color: #83c373;
}

.kr-registration .woocommerce-password-strength.short {
    background-color: #f1adad;
    border-color: #e35b5b;
}

.kr-registration .woocommerce-password-strength.bad {
    background-color: #fbc5a9;
    border-color: #f78b53;
}

.kr-registration .woocommerce-password-strength.good {
    background-color: #ffe399;
    border-color: #ffc733;
}

.kr-registration .woocommerce-password-hint {
    display: block;
    margin: 6px 0 0;
    font-size: 12px;
    color: #999;
}

.kr-registration__error {
    margin: 0;
    font-size: 12px;
    color: #b3261e;
}

.kr-registration__error:empty {
    display: none;
}

.kr-registration__message {
    font-size: 13px;
    color: #b3261e;
    padding: 12px 14px;
    border: 1px solid #f3c9c5;
    background: #fdf2f1;
}

.kr-registration__submit {
    width: 100%;
    min-height: 48px;
    background: #111;
    color: #fff;
    border: none;
    font-size: 14px;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.kr-registration__submit:hover {
    opacity: 0.85;
}

.kr-registration__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kr-registration__submit:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.kr-registration__signin {
    margin: 24px 0 0;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.kr-registration__signin a {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 480px) {
    .kr-registration {
        padding: 32px 0 48px;
    }

    .kr-registration__row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}