.evcm-embed-wrapper {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    max-width: 100vw;
    background: #f9fafb;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.evcm-embed-wrapper::before {
    content: '';
    display: block;
    position: absolute;
    inset: 0;
    background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='14' stroke='%23e5e7eb' stroke-width='4' fill='none'/%3E%3Cpath d='M20 6a14 14 0 0 1 14 14' stroke='%233b82f6' stroke-width='4' fill='none' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 20 20' to='360 20 20' dur='0.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") center center / 40px no-repeat;
    opacity: 1;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 0;
}

.evcm-embed-wrapper.evcm-loaded::before {
    opacity: 0;
}

.evcm-embed-frame {
    display: block;
    width: 100%;
    border: none;
    position: relative;
    z-index: 1;
    min-height: 400px;
    transition: height 0.2s ease;
}

/*
 * Full-Page Kit Gallery mode (see templates/full-page.php): some themes
 * (e.g. Astra's "Transparent Header") position the site nav absolute/fixed
 * so it can overlay a hero image below it. Our bare template has no hero to
 * overlay, so that positioning just makes the nav float on top of the app
 * instead of sitting above it. Force it back into normal document flow,
 * scoped to this page only via the evcm-full-page body class.
 */
body.evcm-full-page header,
body.evcm-full-page .site-header,
body.evcm-full-page #masthead {
    position: relative !important;
    top: auto !important;
}

/* The app fills the window below the header (see embed.js), so drop the
   theme's bottom spacing (e.g. Avada's 60px on #main) that would push the
   page into scrolling past it. */
body.evcm-full-page #main,
body.evcm-full-page #content,
body.evcm-full-page .site-main {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* ── Logged-out prompt (shown instead of the embed when not signed in) ─────── */

.evcm-login-required {
    display: flex;
    justify-content: center;
    padding: 48px 16px;
    background: #f9fafb;
}

.evcm-login-card {
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.evcm-login-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.evcm-login-text {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #6b7280;
}

.evcm-login-required #loginform p {
    margin: 0 0 12px;
}

.evcm-login-required #loginform label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.evcm-login-required #loginform input[type="text"],
.evcm-login-required #loginform input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.evcm-login-required #loginform .login-remember label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    color: #6b7280;
}

.evcm-login-required #loginform .login-submit input[type="submit"] {
    width: 100%;
    padding: 9px 14px;
    background: #4f46e5;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.evcm-login-required #loginform .login-submit input[type="submit"]:hover {
    background: #4338ca;
}

.evcm-login-links {
    margin: 16px 0 0;
    font-size: 13px;
    text-align: center;
    color: #6b7280;
}

.evcm-login-links a {
    color: #4f46e5;
    text-decoration: none;
}

.evcm-login-links a:hover {
    text-decoration: underline;
}

.evcm-login-sep {
    margin: 0 8px;
    color: #d1d5db;
}

/* ── WooCommerce login + register forms embedded in the prompt ───────────────
   The <div class="evcm-wc-forms woocommerce"> wrapper lets WooCommerce's own
   form CSS apply; the rules below normalise its two-column layout so it fits
   the card and reads cleanly regardless of theme. Scoped tight; a few
   !important flags override WC's floated `.col-1/.col-2` grid. */

.evcm-login-card--wide {
    max-width: 760px;
}

.evcm-wc-forms,
.evcm-wc-forms * {
    box-sizing: border-box;
}

/* Two columns → flex; kill WooCommerce's clearfix + float grid */
.evcm-wc-forms #customer_login,
.evcm-wc-forms .u-columns,
.evcm-wc-forms .col2-set {
    display: flex !important;
    flex-wrap: wrap;
    gap: 32px;
    margin: 0;
    width: 100%;
}
.evcm-wc-forms .u-columns::before,
.evcm-wc-forms .u-columns::after,
.evcm-wc-forms .col2-set::before,
.evcm-wc-forms .col2-set::after {
    content: none !important;
    display: none !important;
}
.evcm-wc-forms .u-column1,
.evcm-wc-forms .u-column2,
.evcm-wc-forms .col-1,
.evcm-wc-forms .col-2 {
    float: none !important;
    width: auto !important;
    flex: 1 1 260px;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}
.evcm-wc-forms .u-column2,
.evcm-wc-forms .col-2 {
    border-left: 1px solid #e5e7eb;
    padding-left: 32px !important;
}

.evcm-wc-forms h2 {
    margin: 0 0 16px !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    text-transform: none;
}

.evcm-wc-forms form.login,
.evcm-wc-forms form.register,
.evcm-wc-forms form.woocommerce-form {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
}

.evcm-wc-forms .form-row,
.evcm-wc-forms p.woocommerce-form-row,
.evcm-wc-forms .woocommerce-form-row {
    display: block;
    margin: 0 0 14px;
    padding: 0;
    width: 100%;
}

.evcm-wc-forms label {
    display: block;
    margin: 0 0 4px;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
}
.evcm-wc-forms label .required {
    color: #ef4444;
    border: 0;
    text-decoration: none;
}

.evcm-wc-forms input.input-text,
.evcm-wc-forms input[type="text"],
.evcm-wc-forms input[type="email"],
.evcm-wc-forms input[type="password"] {
    width: 100% !important;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    line-height: 1.4;
}
.evcm-wc-forms input.input-text:focus,
.evcm-wc-forms input[type="text"]:focus,
.evcm-wc-forms input[type="email"]:focus,
.evcm-wc-forms input[type="password"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* password field wrapper + show/hide eye toggle */
.evcm-wc-forms .password-input {
    display: block;
    position: relative;
}
.evcm-wc-forms .password-input input {
    padding-right: 40px;
}
.evcm-wc-forms .show-password-input {
    position: absolute;
    right: 8px;
    top: 0;
    height: 100%;
    width: 28px;
    cursor: pointer;
}

/* remember-me checkbox */
.evcm-wc-forms .woocommerce-form-login__rememberme,
.evcm-wc-forms label.woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    color: #6b7280;
    font-size: 13px;
}
.evcm-wc-forms .woocommerce-form__input-checkbox,
.evcm-wc-forms input[type="checkbox"] {
    width: auto !important;
    margin: 0;
}

/* buttons */
.evcm-wc-forms button[type="submit"],
.evcm-wc-forms button.woocommerce-button,
.evcm-wc-forms input[type="submit"] {
    display: block;
    width: 100%;
    margin: 6px 0 0;
    padding: 10px 16px;
    background: #4f46e5;
    color: #fff !important;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
    cursor: pointer;
}
.evcm-wc-forms button[type="submit"]:hover,
.evcm-wc-forms button.woocommerce-button:hover,
.evcm-wc-forms input[type="submit"]:hover {
    background: #4338ca;
}

/* lost password + privacy text + strength meter */
.evcm-wc-forms .lost_password,
.evcm-wc-forms .woocommerce-LostPassword {
    margin: 10px 0 0;
    font-size: 12px;
}
.evcm-wc-forms .lost_password a {
    color: #6b7280;
    text-decoration: none;
}
.evcm-wc-forms .woocommerce-privacy-policy-text {
    margin: 10px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: #9ca3af;
}
.evcm-wc-forms .woocommerce-privacy-policy-text a {
    color: #6b7280;
}
.evcm-wc-forms .woocommerce-password-strength,
.evcm-wc-forms .woocommerce-password-hint {
    display: block;
    margin: 6px 0 0;
    font-size: 12px;
}

@media (max-width: 560px) {
    .evcm-wc-forms #customer_login,
    .evcm-wc-forms .u-columns,
    .evcm-wc-forms .col2-set {
        flex-direction: column;
        gap: 24px;
    }
    .evcm-wc-forms .u-column2,
    .evcm-wc-forms .col-2 {
        border-left: 0;
        padding-left: 0 !important;
        border-top: 1px solid #e5e7eb;
        padding-top: 24px !important;
    }
}

.evcm-login-hint {
    margin: 18px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #9ca3af;
    text-align: center;
}
