/* ----------------------------------------------------------------------
 * MHCS — Checkout Order Bump (4 selectable styles: hero, side, compact, minimal)
 * Mobile-first. Style switched via .mhcs-bump--{style} modifier on the root.
 * ---------------------------------------------------------------------- */

.mhcs-bump {
    --mhcs-radius: 16px;
    --mhcs-accent: #f59e0b;
    --mhcs-accent-strong: #d97706;
    --mhcs-danger: #dc2626;
    --mhcs-text: #0f172a;
    --mhcs-muted: #6b7280;
    --mhcs-bg: #ffffff;
    --mhcs-bg-soft: #fffbeb;
    --mhcs-success: #047857;
    --mhcs-success-bg: #ecfdf5;
    --mhcs-urgency-bg: #fef3c7;
    --mhcs-urgency-fg: #92400e;

    margin: 18px 0;
    background: var(--mhcs-bg);
    border: 2px solid var(--mhcs-accent);
    border-radius: var(--mhcs-radius);
    box-shadow: 0 18px 40px -22px rgba(217, 119, 6, .55), 0 2px 6px -3px rgba(15,23,42,.08);
    overflow: hidden;
    position: relative;
    font-family: inherit;
    color: var(--mhcs-text);
    box-sizing: border-box;
    max-width: 100%;
}
.mhcs-bump *, .mhcs-bump *::before, .mhcs-bump *::after { box-sizing: border-box; }
.mhcs-bump.is-loading { opacity: .85; pointer-events: none; }

/* -------- Ribbon (shared) --------------------------------------------- */
.mhcs-bump__ribbon {
    background: linear-gradient(90deg, #dc2626, #f59e0b);
    color: #fff;
    text-align: center;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}
.mhcs-bump[dir="rtl"] .mhcs-bump__ribbon { letter-spacing: 0; font-size: 15px; }

/* -------- Layout container (default = column) ------------------------ */
.mhcs-bump__layout { display: flex; flex-direction: column; }

/* -------- Media (image) ---------------------------------------------- */
.mhcs-bump__media {
    position: relative;
    background: #fff;
    overflow: hidden;
}
.mhcs-bump__media img,
.mhcs-bump__img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    max-width: none !important;
}
.mhcs-bump__discount-badge {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: var(--mhcs-danger);
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    line-height: 1;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 6px 16px -4px rgba(220, 38, 38, .55);
    letter-spacing: .02em;
    z-index: 2;
}
.mhcs-bump[dir="rtl"] .mhcs-bump__discount-badge { letter-spacing: 0; }

/* -------- Content block ---------------------------------------------- */
.mhcs-bump__content {
    padding: 18px 18px 16px;
    background: var(--mhcs-bg-soft);
    text-align: center;
    flex: 1 1 auto;
    min-width: 0;
}
.mhcs-bump__title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--mhcs-text);
    word-break: break-word;
}

/* -------- Price stack ------------------------------------------------- */
.mhcs-bump__price-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}
.mhcs-bump__price-label {
    font-size: 12px;
    color: var(--mhcs-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-inline-end: 6px;
}
.mhcs-bump[dir="rtl"] .mhcs-bump__price-label {
    text-transform: none;
    letter-spacing: 0;
    margin-inline-end: 0;
    margin-inline-start: 6px;
}
.mhcs-bump__was { font-size: 14px; color: var(--mhcs-muted); }
.mhcs-bump__was s,
.mhcs-bump__was s .woocommerce-Price-amount {
    color: var(--mhcs-muted);
    text-decoration: line-through;
}
.mhcs-bump__now { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.mhcs-bump__now strong {
    font-size: 32px;
    font-weight: 900;
    color: var(--mhcs-danger);
    line-height: 1.1;
}
.mhcs-bump__now strong .woocommerce-Price-amount { color: var(--mhcs-danger); }
.mhcs-bump__save-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--mhcs-success-bg);
    color: var(--mhcs-success);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    border: 1px solid rgba(4, 120, 87, .18);
}
.mhcs-bump__save-pill strong { font-weight: 900; }
.mhcs-bump__save-pill strong .woocommerce-Price-amount { color: var(--mhcs-success); }

/* -------- CTA (shared) ------------------------------------------------ */
.mhcs-bump__cta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid var(--mhcs-accent);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
    box-shadow: 0 2px 0 rgba(217, 119, 6, .08), 0 8px 18px -10px rgba(217, 119, 6, .45);
    text-align: start;
}
.mhcs-bump__cta:hover {
    background: #fffaf0;
    border-color: var(--mhcs-accent-strong);
    box-shadow: 0 4px 0 rgba(217, 119, 6, .12), 0 12px 24px -10px rgba(217, 119, 6, .55);
}
.mhcs-bump__cta:active { transform: translateY(1px); }
.mhcs-bump__checkbox {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin: 0;
    accent-color: var(--mhcs-accent-strong);
    cursor: pointer;
}
.mhcs-bump__cta-text {
    flex: 1 1 auto;
    font-size: 15px;
    font-weight: 800;
    color: var(--mhcs-text);
    line-height: 1.35;
}
.mhcs-bump__cta:has(.mhcs-bump__checkbox:checked) {
    background: #ecfdf5;
    border-color: #10b981;
    box-shadow: 0 2px 0 rgba(4, 120, 87, .15), 0 12px 24px -10px rgba(4, 120, 87, .35);
}

/* -------- Urgency / spinner / error ---------------------------------- */
.mhcs-bump__urgency {
    margin-top: 6px;
    padding: 10px 12px;
    background: var(--mhcs-urgency-bg);
    color: var(--mhcs-urgency-fg);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}
.mhcs-bump__spinner {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--mhcs-accent);
    border-top-color: transparent;
    animation: mhcs-bump-spin .8s linear infinite;
    opacity: 0;
}
.mhcs-bump.is-loading .mhcs-bump__spinner { opacity: 1; }
@keyframes mhcs-bump-spin { to { transform: rotate(360deg); } }
.mhcs-bump__error {
    margin-top: 10px;
    padding: 9px 12px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: start;
}
.mhcs-bump__error[hidden] { display: none !important; }
.mhcs-bump-line td { background: var(--mhcs-bg-soft) !important; }

/* ====================================================================
 * STYLE 1 — HERO (default): large hero image, vertical price stack
 * ==================================================================== */
.mhcs-bump--hero .mhcs-bump__media {
    width: 100%;
    aspect-ratio: 4 / 3;
}
@supports not (aspect-ratio: 4 / 3) {
    .mhcs-bump--hero .mhcs-bump__media { height: 280px; }
}
@media (min-width: 768px) {
    .mhcs-bump--hero .mhcs-bump__media { aspect-ratio: 16 / 10; max-height: 360px; }
}

/* ====================================================================
 * STYLE 2 — SIDE: image on the side, content beside
 * ==================================================================== */
.mhcs-bump--side .mhcs-bump__layout { flex-direction: row; align-items: stretch; }
.mhcs-bump--side .mhcs-bump__media {
    flex: 0 0 38%;
    max-width: 200px;
    align-self: stretch;
}
.mhcs-bump--side .mhcs-bump__content {
    text-align: start;
    padding: 14px 16px 14px;
}
.mhcs-bump--side .mhcs-bump__price-stack { align-items: flex-start; gap: 4px; margin-bottom: 10px; }
.mhcs-bump--side .mhcs-bump__now { justify-content: flex-start; }
.mhcs-bump--side .mhcs-bump__now strong { font-size: 26px; }
.mhcs-bump--side .mhcs-bump__title { font-size: 16px; margin-bottom: 8px; }
.mhcs-bump--side .mhcs-bump__discount-badge { top: 8px; inset-inline-end: 8px; font-size: 13px; padding: 7px 10px; }
@media (max-width: 480px) {
    .mhcs-bump--side .mhcs-bump__media { flex-basis: 42%; max-width: 160px; }
    .mhcs-bump--side .mhcs-bump__now strong { font-size: 22px; }
}

/* ====================================================================
 * STYLE 3 — COMPACT: small inline image, low vertical footprint
 * ==================================================================== */
.mhcs-bump--compact .mhcs-bump__layout {
    flex-direction: row;
    align-items: center;
    padding: 12px;
    background: var(--mhcs-bg-soft);
    gap: 12px;
}
.mhcs-bump--compact .mhcs-bump__media {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border-radius: 10px;
}
.mhcs-bump--compact .mhcs-bump__discount-badge { top: 4px; inset-inline-end: 4px; font-size: 11px; padding: 4px 7px; border-radius: 8px; }
.mhcs-bump--compact .mhcs-bump__content {
    padding: 0;
    background: transparent;
    text-align: start;
    flex: 1 1 auto;
}
.mhcs-bump--compact .mhcs-bump__title { font-size: 14px; margin-bottom: 4px; }
.mhcs-bump--compact .mhcs-bump__price-stack { flex-direction: row; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.mhcs-bump--compact .mhcs-bump__now strong { font-size: 18px; }
.mhcs-bump--compact .mhcs-bump__price-label { font-size: 10px; }
.mhcs-bump--compact .mhcs-bump__save-pill { font-size: 11px; padding: 3px 9px; }
.mhcs-bump--compact .mhcs-bump__cta { padding: 9px 12px; margin: 0; }
.mhcs-bump--compact .mhcs-bump__cta-text { font-size: 13px; }
.mhcs-bump--compact .mhcs-bump__checkbox { width: 20px; height: 20px; }
.mhcs-bump--compact .mhcs-bump__urgency { font-size: 11.5px; padding: 6px 10px; margin-top: 6px; }

/* ====================================================================
 * STYLE 4 — MINIMAL: no image, title + price + CTA only
 * ==================================================================== */
.mhcs-bump--minimal .mhcs-bump__content {
    padding: 14px 16px;
    background: #fff;
    text-align: start;
}
.mhcs-bump--minimal .mhcs-bump__price-stack { flex-direction: row; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.mhcs-bump--minimal .mhcs-bump__now { justify-content: flex-start; }
.mhcs-bump--minimal .mhcs-bump__title { font-size: 16px; margin-bottom: 6px; }
.mhcs-bump--minimal .mhcs-bump__now strong { font-size: 22px; }
.mhcs-bump--minimal .mhcs-bump__cta { padding: 11px 14px; }
.mhcs-bump--minimal .mhcs-bump__cta-text { font-size: 14px; }

/* -------- Mobile tightenings (apply to all styles) -------------------- */
@media (max-width: 480px) {
    .mhcs-bump { margin: 14px 0; border-radius: 14px; }
    .mhcs-bump__ribbon { font-size: 13px; padding: 9px 12px; }
    .mhcs-bump[dir="rtl"] .mhcs-bump__ribbon { font-size: 14px; }
    .mhcs-bump--hero .mhcs-bump__content { padding: 15px 14px 14px; }
    .mhcs-bump--hero .mhcs-bump__title { font-size: 16px; margin-bottom: 10px; }
    .mhcs-bump--hero .mhcs-bump__now strong { font-size: 28px; }
    .mhcs-bump__cta { padding: 12px 14px; gap: 10px; }
    .mhcs-bump__cta-text { font-size: 14px; }
    .mhcs-bump--hero .mhcs-bump__discount-badge { font-size: 14px; padding: 8px 11px; top: 10px; }
}
@media (max-width: 360px) {
    .mhcs-bump--hero .mhcs-bump__now strong { font-size: 24px; }
    .mhcs-bump--hero .mhcs-bump__title { font-size: 15px; }
    .mhcs-bump__cta-text { font-size: 13.5px; }
}
