/* WC Modal Auth */

/* ----- Overlay ----- */
.wc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wc-modal-overlay[hidden] { display: none !important; }

.wc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,1.0);
    backdrop-filter: blur(2px);
}

/* ----- Box ----- */
.wc-modal-box {
    position: relative;
    z-index: 1;
    background: #fff;
    width: 100%;
    max-width: 580px;
    /* Leave room at top for the close button (44px + 16px gap) */
    max-height: calc(92vh - 76px);
    overflow-y: auto;
    padding: 40px 48px 44px;
    box-shadow: 0 4px 40px rgba(0,0,0,.12);
    font-family: inherit;
    box-sizing: border-box;
    /* Push box down below the close button */
    margin-top: 76px;
}
@media (max-width: 640px) {
    .wc-modal-box {
        padding: 32px 20px 36px;
        margin-top: 126px;
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 72px);
        border-radius: 0;
    }
}

/* ----- Close ----- */
/* Sits outside .wc-modal-box as a direct child of the overlay.
   position:absolute on a position:fixed parent = safe on all Safari/iOS versions. */
.wc-modal-close {
    position: absolute;
    top: 0px;
    right: 10px;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #444;
    transition: color .15s, background .15s;
    padding: 0;
    /* Ensure it is never obscured by the box on any screen size */
    flex-shrink: 0;
    border:none !important;
}


/* ----- Body ----- */
.wc-modal-body { display: flex; flex-direction: column; }

/* ----- Fields ----- */
.wc-field {
    position: relative;
    margin-bottom: 8px;
}

.wc-field input[type="text"],
.wc-field input[type="email"],
.wc-field input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    height: 52px;
    padding: 0 16px;
    border: 1.5px solid #c8c8c8;
    border-radius: 0;
    background: #fff;
    font-size: 15px;
    color: #222;
    font-family: inherit;
    outline: none;
    transition: border-color .15s;
    -webkit-appearance: none;
    appearance: none;
}
.wc-field input::placeholder { color: #a0a0a0; }
.wc-field input:focus { border-color: #222; }

/* invalid state */
.wc-field input.is-invalid,
.wc-field input.is-invalid:focus {
    border-color: #000;
}
/* valid state */
.wc-field input.is-valid {
    border-color: #000;
}

/* password field right padding for toggle button */
.wc-field--pw input { padding-right: 46px; }

.wc-pw-toggle {
    position: absolute;
    right: 13px;
    top: 14px;
    background: none; border: none;
    cursor: pointer; padding: 0;
    color: #999;
    display: flex; align-items: center;
    transition: color .15s;
    line-height: 1;
}
.wc-pw-toggle:hover { color: #222; }

/* ----- Field errors ----- */
.wc-field-error {
    display: block;
    font-size: 12px;
    color: #db4b68;
    margin-top: 3px;
    min-height: 16px;
    line-height: 1.3;
}
.wc-field-error:empty { min-height: 0; margin-top: 0; }

/* ----- Checkboxes ----- */
.wc-checkbox {
    /*display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;*/
    cursor: pointer;
    user-select: none;
}
.wc-checkbox input[type="checkbox"] {
   /* position: absolute; opacity: 0; width: 0; height: 0;*/
}
.wc-checkbox__box {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border: 1.5px solid #c8c8c8;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    margin-top: 1px;
    transition: border-color .15s, background .15s;
}
/* invalid checkbox */
.wc-checkbox.is-invalid .wc-checkbox__box {
    border-color: #000;
}
.wc-checkbox input:checked + .wc-checkbox__box {
    background: #000; border-color: #000;
}
.wc-checkbox input:checked + .wc-checkbox__box::after {
    content: '';
    display: block;
    width: 5px; height: 10px;
    border: 2px solid #fff;
    border-top: none; border-left: none;
    transform: rotate(45deg) translate(-1px,-1px);
}
.wc-checkbox__label {
    font-size: 13px; color: #666; line-height: 1.5;
}
.wc-checkbox__label a { color: #000; font-weight: 600; text-decoration: none; }
.wc-checkbox__label a:hover { text-decoration: underline; }

/* checkbox error appears below the label row */
.wc-field-error + .wc-checkbox,
.wc-checkbox + .wc-field-error {
    margin-top: 4px;
}

#wc-recaptcha-widget {
    transform:scale(0.79) !important;
    transform-origin: top left !important;
}

/* ----- Buttons ----- */
.wc-btn {
    display: block; width: 100%; box-sizing: border-box;
    height: 56px; padding: 0 20px;
    font-size: 13px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    cursor: pointer; font-family: inherit;
    border: 2px solid #000;
    transition: background .15s, color .15s;
}
.wc-btn--primary {
    background: #000; color: #fff;
    margin-top: 20px;
}
.wc-btn--primary:hover { background: #222; }
.wc-btn--primary:disabled { opacity: .6; cursor: not-allowed; }

.wc-btn--secondary {
    background: #111; color: #fff;
    border-color: #111; margin-top: 4px;
}
.wc-btn--secondary:hover { background: #333; border-color: #333; }

/* ----- Lost password ----- */
.wc-lost-pw {
    text-align: center;
    margin: 14px 0 6px;
    font-size: 14px; color: #666;
}
.wc-lost-pw a { color: #666; text-decoration: none; }
.wc-lost-pw a:hover { text-decoration: underline; }

/* ----- Switch ----- */
.wc-switch { text-align: center; margin-top: 14px; }
.wc-link-btn {
    background: none; border: none;
    cursor: pointer; font-size: 13px;
    color: #555; text-decoration: underline;
    font-family: inherit; padding: 0;
}
.wc-link-btn:hover { color: #000; }

/* ----- Top-level messages (success / generic error) ----- */
.wc-msg {
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}
.wc-msg.is-error   { background: #fff0f0; border: 1.5px solid #000; color: #000; }
.wc-msg.is-success { background: #f0fff4; border: 1.5px solid #000; color: #000; }

/* ----- Animate in ----- */
.wc-modal-overlay:not([hidden]) .wc-modal-box {
    animation: wcModalIn .2s ease;
}
@keyframes wcModalIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----- reCAPTCHA wrapper ----- */
.wc-recaptcha-wrap {
    margin-top: 18px;
}
.wc-recaptcha-wrap .wc-field-error {
    margin-top: 6px;
}
/* Scale down on very narrow screens */
@media (max-width: 360px) {
    .wc-recaptcha-wrap .g-recaptcha {
        transform: scale(0.88);
        transform-origin: left top;
    }
}
