/* =========================================================
   Shirtsy MemberPress brand skin — scoped to product 3791
   Design system: matches /how-it-works/ (HIW) iframe design.
   Palette: CMYK brand colors. Typography: Exo only.
   Functionality preserved — MemberPress form selectors and
   their behavior are untouched; this file only restyles.
   ========================================================= */

body.postid-3791 {
    --hiw-cyan:         #00AEEF;
    --hiw-cyan-dark:    #008dc0;
    --hiw-magenta:      #EC008C;
    --hiw-magenta-dark: #c40075;
    --hiw-yellow:       #FFF200;
    --hiw-green:        #8DC63F;
    --hiw-ink:          #231F20;
    --hiw-white:        #FFFFFF;
    --hiw-bg-alt:       #f8f9fa;
    --hiw-text-sec:     #555555;
    --hiw-text-muted:   #6c757d;
    --hiw-border:       #e9ecef;
    --hiw-border-mid:   #dee2e6;
    --hiw-radius:       8px;
    --hiw-radius-sm:    4px;
    --hiw-shadow-card:  0 2px 8px rgba(0,0,0,0.06);
    --hiw-shadow-hover: 0 6px 20px rgba(0,0,0,0.10);
}

/* Page surface */
html body.postid-3791,
body.postid-3791 .rey-siteMain,
body.postid-3791 .rey-siteMain-inner,
body.postid-3791 .rey-postContent,
body.postid-3791 .rey-postItem,
body.postid-3791 .rey-pageContent {
    background-color: #ffffff !important;
}

/* Hide theme chrome */
html body.postid-3791 header.rey-postHeader,
html body.postid-3791 .rey-postHeader,
html body.postid-3791 .rey-postTitle,
html body.postid-3791 .rey-postInfo,
html body.postid-3791 .rey-entryDate,
html body.postid-3791 .rey-postDuration,
html body.postid-3791 .rey-postItem > .entry-header,
html body.postid-3791 .rey-postItem > header,
html body.postid-3791 .rey-postMeta,
html body.postid-3791 .rey-readingTime,
html body.postid-3791 .rey-postDate,
html body.postid-3791 .post-date,
html body.postid-3791 .entry-meta,
html body.postid-3791 .entry-title,
html body.postid-3791 .page-title,
html body.postid-3791 .breadcrumbs,
html body.postid-3791 .breadcrumb,
html body.postid-3791 .rey-breadcrumbs,
html body.postid-3791 h1.entry-title,
html body.postid-3791 header.post-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Flush the hero to the top of the main content area */
body.postid-3791 .rey-postContent,
body.postid-3791 .rey-postItem,
body.postid-3791 .rey-siteMain-inner,
body.postid-3791 .rey-siteMain {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.postid-3791 .shirtsy-mepr-hero {
    margin-top: 0 !important;
}
body.postid-3791 .rey-postContent > p:empty,
body.postid-3791 .rey-postContent > br {
    display: none !important;
}

/* =========================================================
   HERO (injected via the_content filter — class names kept)
   ========================================================= */
body.postid-3791 .shirtsy-mepr-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    background: linear-gradient(160deg, #ffffff 0%, #f3f4f6 100%);
    padding: 90px 24px 70px;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid var(--hiw-border);
    font-family: 'Exo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
body.postid-3791 .shirtsy-mepr-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(236,0,140,0.06) 0%, transparent 70%);
    pointer-events: none;
}
body.postid-3791 .shirtsy-mepr-hero-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(236,0,140,0.05);
    border: 1px solid rgba(236,0,140,0.3);
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--hiw-text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 22px;
}
body.postid-3791 .shirtsy-mepr-hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hiw-magenta);
    box-shadow: 0 0 0 3px rgba(236,0,140,0.15);
}
body.postid-3791 .shirtsy-mepr-hero h1 {
    position: relative;
    font-family: 'Exo', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: clamp(32px, 5.5vw, 50px) !important;
    color: var(--hiw-ink) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    font-weight: 800 !important;
    margin: 0 auto 18px !important;
    max-width: 680px;
    text-transform: none !important;
}
body.postid-3791 .shirtsy-mepr-hero h1 em {
    font-style: normal;
    background: linear-gradient(90deg, var(--hiw-magenta), var(--hiw-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
body.postid-3791 .shirtsy-mepr-hero-sub {
    position: relative;
    font-size: 18px;
    color: var(--hiw-text-sec);
    font-weight: 300;
    margin: 0 auto 24px;
    max-width: 500px;
    line-height: 1.6;
}
body.postid-3791 .shirtsy-mepr-hero-meta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    background: rgba(0,174,239,0.05);
    border: 1px solid rgba(0,174,239,0.3);
    border-radius: 100px;
    font-family: 'Exo', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--hiw-text-sec);
    letter-spacing: 0.02em;
}

/* =========================================================
   SIGNUP FORM CARD
   ========================================================= */
body.postid-3791 .mepr-signup-form,
body.postid-3791 form.mepr-signup-form,
body.postid-3791 #mepr-signup-form,
body.postid-3791 form#mepr_signup_form {
    background: var(--hiw-white);
    border: 1px solid var(--hiw-border);
    border-top: 3px solid var(--hiw-magenta);
    border-radius: var(--hiw-radius);
    padding: 44px 36px 36px;
    margin: 48px auto 60px auto;
    max-width: 680px;
    position: relative;
    box-shadow: var(--hiw-shadow-card);
    font-family: 'Exo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Price / terms banner */
body.postid-3791 .mepr-price-terms,
body.postid-3791 .mepr_price_str,
body.postid-3791 .mepr-price-display,
body.postid-3791 .mp-price,
body.postid-3791 .mepr-price {
    display: block;
    background: var(--hiw-bg-alt);
    border: 1px solid var(--hiw-border);
    border-left: 3px solid var(--hiw-magenta);
    color: var(--hiw-ink) !important;
    border-radius: var(--hiw-radius);
    padding: 14px 20px;
    font-family: 'Exo', sans-serif;
    font-size: 15px;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 600;
}

/* Section dividers inside MP form */
body.postid-3791 .mepr-signup-form h3,
body.postid-3791 .mepr-signup-form legend {
    font-family: 'Exo', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--hiw-ink);
    margin: 20px 0 14px;
    padding: 0;
    border: none;
}

/* Labels */
body.postid-3791 .mp_wrapper label,
body.postid-3791 .mepr-form-row label,
body.postid-3791 .mepr_checkout label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--hiw-ink);
    letter-spacing: 0.01em;
    margin-bottom: 6px;
    text-transform: none;
    font-family: 'Exo', sans-serif;
}

/* Inputs */
body.postid-3791 .mp_wrapper input[type="text"],
body.postid-3791 .mp_wrapper input[type="email"],
body.postid-3791 .mp_wrapper input[type="password"],
body.postid-3791 .mp_wrapper input[type="tel"],
body.postid-3791 .mp_wrapper input[type="number"],
body.postid-3791 .mp_wrapper select,
body.postid-3791 .mp_wrapper textarea,
body.postid-3791 .mepr-signup-form input[type="text"],
body.postid-3791 .mepr-signup-form input[type="email"],
body.postid-3791 .mepr-signup-form input[type="password"],
body.postid-3791 .mepr-signup-form input[type="tel"],
body.postid-3791 .mepr-signup-form input[type="number"],
body.postid-3791 .mepr-signup-form select,
body.postid-3791 .mepr-signup-form textarea {
    width: 100%;
    max-width: 100%;
    font-family: 'Exo', sans-serif !important;
    font-size: 15px;
    font-weight: 400;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid var(--hiw-border-mid);
    border-radius: var(--hiw-radius-sm);
    color: var(--hiw-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    line-height: 1.4;
}
body.postid-3791 .mp_wrapper input:focus,
body.postid-3791 .mp_wrapper select:focus,
body.postid-3791 .mp_wrapper textarea:focus,
body.postid-3791 .mepr-signup-form input:focus,
body.postid-3791 .mepr-signup-form select:focus,
body.postid-3791 .mepr-signup-form textarea:focus {
    outline: none;
    border-color: var(--hiw-cyan);
    box-shadow: 0 0 0 3px rgba(0,174,239,0.15);
}

/* Select chevron */
body.postid-3791 .mp_wrapper select,
body.postid-3791 .mepr-signup-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='none' stroke='%236c757d' stroke-width='2' d='M1 1.5l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    padding-right: 40px;
}

/* Field wrapper spacing */
body.postid-3791 .mp_wrapper {
    margin-bottom: 16px;
}

/* Two-column layout for first/last name, city/state/zip */
@media (min-width: 640px) {
    body.postid-3791 .mepr-signup-form .mepr_first_name,
    body.postid-3791 .mepr-signup-form .mepr_last_name,
    body.postid-3791 .mepr-signup-form .mepr_city,
    body.postid-3791 .mepr-signup-form .mepr_zip_code,
    body.postid-3791 .mepr-signup-form .mepr_country,
    body.postid-3791 .mepr-signup-form .mepr_state {
        display: inline-block;
        width: calc(50% - 6px);
        vertical-align: top;
    }
    body.postid-3791 .mepr-signup-form .mepr_first_name,
    body.postid-3791 .mepr-signup-form .mepr_city,
    body.postid-3791 .mepr-signup-form .mepr_country {
        margin-right: 10px;
    }
}

/* Required asterisk */
body.postid-3791 .mp-required,
body.postid-3791 .mepr-required,
body.postid-3791 label .mepr-required-asterisk,
body.postid-3791 .required {
    color: var(--hiw-magenta) !important;
    font-weight: 700;
}

/* Coupon link + field */
body.postid-3791 .mepr-has-coupon,
body.postid-3791 a.mepr-coupon-link,
body.postid-3791 .mepr_coupon_code_trigger,
body.postid-3791 #mepr_coupon_code_trigger {
    display: inline-block;
    color: var(--hiw-cyan) !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 13px;
    margin: 8px 0 12px;
}
body.postid-3791 a.mepr-coupon-link:hover {
    text-decoration: underline !important;
}
body.postid-3791 .mepr-coupon-wrapper {
    padding: 14px 16px;
    background: var(--hiw-bg-alt);
    border: 1px dashed var(--hiw-border-mid);
    border-radius: var(--hiw-radius);
    margin: 10px 0 18px;
}

/* Submit button — HIW .btn-primary (cyan, 4px radius) */
body.postid-3791 input[type="submit"],
body.postid-3791 button[type="submit"],
body.postid-3791 .mepr-submit,
body.postid-3791 .mepr-signup-button,
body.postid-3791 input.mepr-signup-button,
body.postid-3791 .mp-form-submit input,
body.postid-3791 #mepr_payment_form input[type="submit"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--hiw-cyan) !important;
    color: #fff !important;
    font-family: 'Exo', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 16px 40px !important;
    border-radius: var(--hiw-radius-sm) !important;
    border: 2px solid var(--hiw-cyan) !important;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: none !important;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease !important;
    min-width: 220px;
    letter-spacing: 0.03em;
    text-transform: none !important;
    margin-top: 12px;
    width: auto !important;
    line-height: 1.2 !important;
}
body.postid-3791 input[type="submit"]:hover,
body.postid-3791 button[type="submit"]:hover,
body.postid-3791 .mepr-submit:hover,
body.postid-3791 .mepr-signup-button:hover {
    background: var(--hiw-cyan-dark) !important;
    border-color: var(--hiw-cyan-dark) !important;
    transform: translateY(-1px);
}

/* Payment method radios (step 2) */
body.postid-3791 .mepr-payment-methods,
body.postid-3791 .mepr-price-gateway-radios {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0 18px;
}
body.postid-3791 .mepr-price-gateway-radios label {
    flex: 1 1 auto;
    min-width: 140px;
    padding: 12px 16px;
    border: 1px solid var(--hiw-border-mid);
    border-radius: var(--hiw-radius);
    cursor: pointer;
    font-size: 14px;
    color: var(--hiw-ink);
    background: #ffffff;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
body.postid-3791 .mepr-price-gateway-radios label:hover {
    border-color: var(--hiw-cyan);
    box-shadow: 0 0 0 3px rgba(0,174,239,0.10);
}

/* Error / notice boxes */
body.postid-3791 .mepr-form-has-errors,
body.postid-3791 .mp_error,
body.postid-3791 .mepr_error {
    background: rgba(236,0,140,0.05);
    border: 1px solid rgba(236,0,140,0.3);
    border-left: 3px solid var(--hiw-magenta);
    border-radius: var(--hiw-radius);
    padding: 12px 16px;
    color: var(--hiw-magenta);
    font-size: 14px;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 640px) {
    body.postid-3791 .mepr-signup-form,
    body.postid-3791 #mepr_signup_form {
        padding: 32px 20px 28px;
        margin: 32px 16px 40px 16px;
    }
    body.postid-3791 input[type="submit"],
    body.postid-3791 button[type="submit"],
    body.postid-3791 .mepr-signup-button {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* =========================================================
   STEP 2 — Invoice summary card
   ========================================================= */
body.postid-3791 .mp_wrapper.mp_invoice {
    background: var(--hiw-white);
    border: 1px solid var(--hiw-border);
    border-top: 3px solid var(--hiw-cyan);
    border-radius: var(--hiw-radius);
    padding: 28px 32px 24px;
    margin: 48px auto 18px auto;
    max-width: 680px;
    position: relative;
    box-shadow: var(--hiw-shadow-card);
    font-family: 'Exo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
body.postid-3791 .mp_wrapper.mp_invoice .mp_price_str {
    background: var(--hiw-bg-alt);
    border: 1px solid var(--hiw-border);
    border-left: 3px solid var(--hiw-cyan);
    color: var(--hiw-ink);
    border-radius: var(--hiw-radius);
    padding: 12px 20px;
    font-family: 'Exo', sans-serif;
    font-size: 15px;
    margin: 0 0 18px;
    text-align: center;
    font-weight: 600;
}
body.postid-3791 .mp_wrapper.mp_invoice .mp_price_str strong {
    font-weight: 600;
    opacity: 0.7;
    margin-right: 6px;
}
body.postid-3791 .mp_wrapper.mp_invoice .mp-spacer { display: none; }
body.postid-3791 .mp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--hiw-ink);
}
body.postid-3791 .mp-table thead th {
    font-family: 'Exo', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hiw-text-muted);
    text-align: left;
    padding: 10px 0;
    border-bottom: 1px solid var(--hiw-border);
    background: transparent;
}
body.postid-3791 .mp-table tbody td {
    padding: 14px 0;
    border-bottom: 1px solid var(--hiw-border);
    color: var(--hiw-text-sec);
    font-weight: 400;
}
body.postid-3791 .mp-table tfoot th {
    font-family: 'Exo', sans-serif;
    font-weight: 700;
    font-size: 18px;
    padding: 16px 0 4px;
    color: var(--hiw-ink);
    border: none;
    background: transparent;
}
body.postid-3791 .mp-table tfoot th.mp-currency-cell {
    color: var(--hiw-cyan);
}
body.postid-3791 .mp-table .mp-currency-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* =========================================================
   STEP 2 — Payment form card
   ========================================================= */
body.postid-3791 .mp_wrapper.mp_payment_form_wrapper {
    max-width: 680px;
    margin: 0 auto 60px auto;
}
body.postid-3791 form.mepr-checkout-form,
body.postid-3791 form#mepr_authorize_net_payment_form,
body.postid-3791 form.mepr-card-form {
    background: var(--hiw-white);
    border: 1px solid var(--hiw-border);
    border-top: 3px solid var(--hiw-green);
    border-radius: var(--hiw-radius);
    padding: 32px 32px 28px;
    box-shadow: var(--hiw-shadow-card);
    font-family: 'Exo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Section title on payment card */
body.postid-3791 form.mepr-checkout-form::before,
body.postid-3791 form#mepr_authorize_net_payment_form::before {
    content: 'Payment details';
    display: block;
    font-family: 'Exo', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--hiw-ink);
    margin: 0 0 18px;
}

/* CC form rows — override to single column */
body.postid-3791 form.mepr-card-form .mp-form-row,
body.postid-3791 form#mepr_authorize_net_payment_form .mp-form-row {
    display: block !important;
    width: 100% !important;
    margin: 0 0 14px !important;
}
@media (min-width: 640px) {
    body.postid-3791 form.mepr-card-form .mp-form-row:has(.cc-exp),
    body.postid-3791 form.mepr-card-form .mp-form-row:has(.cc-cvc) {
        display: inline-block !important;
        width: calc(50% - 6px) !important;
        vertical-align: top;
    }
    body.postid-3791 form.mepr-card-form .mp-form-row:has(.cc-exp) {
        margin-right: 10px !important;
    }
}

body.postid-3791 input.cc-number {
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}
body.postid-3791 input.cc-exp,
body.postid-3791 input.cc-cvc {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

/* Submit on payment form — full width */
body.postid-3791 form.mepr-card-form input[type="submit"],
body.postid-3791 form#mepr_authorize_net_payment_form input[type="submit"] {
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 8px !important;
}
body.postid-3791 form.mepr-card-form input[type="submit"]::before {
    content: '\1F512  ';
    margin-right: 6px;
    font-size: 13px;
    opacity: 0.9;
}

/* Inline cc error messages */
body.postid-3791 .cc-error {
    display: none;
    color: var(--hiw-magenta);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}
body.postid-3791 .mp-form-row.cc-form-row-error .cc-error,
body.postid-3791 .mp-form-row .cc-error.show {
    display: block;
}
body.postid-3791 .mepr-form-has-errors {
    display: none;
    background: rgba(236,0,140,0.05);
    border: 1px solid rgba(236,0,140,0.3);
    border-left: 3px solid var(--hiw-magenta);
    border-radius: var(--hiw-radius);
    padding: 10px 14px;
    color: var(--hiw-magenta);
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
}

/* Responsive tweaks for step 2 */
@media (max-width: 640px) {
    body.postid-3791 .mp_wrapper.mp_invoice {
        padding: 22px 20px 18px;
        margin: 32px 16px 14px 16px;
    }
    body.postid-3791 .mp_wrapper.mp_payment_form_wrapper {
        margin: 0 16px 40px 16px;
    }
    body.postid-3791 form.mepr-card-form,
    body.postid-3791 form#mepr_authorize_net_payment_form {
        padding: 24px 20px 22px;
    }
}
