.cmj-payment-status {
    padding: 16px 20px;
    margin: 0 0 24px;
    color: #fff;
    background: #334155;
    border-radius: 4px;
}
.cmj-payment-status.cmj-payment-error { background: var(--cmj-cancel-color, #b42318); color: #fff; }
.cmj-payment-status.cmj-payment-success { background: #166534; color: #fff; }
.cmj-status-help { font-size: .9em; }
/* Scope to CMJ capacity errors; coupon and informational notices keep their colors. */
.woocommerce .woocommerce-error:has(.cmj-capacity-notice),
.woocommerce .woocommerce-info:has(.cmj-capacity-notice),
.woocommerce .woocommerce-message:has(.cmj-capacity-notice) {
    background: #b42318 !important;
    color: #fff !important;
    border-color: #b42318 !important;
}
.cmj-capacity-notice { display: block; background: #b42318; color: #fff; padding: 12px 16px; line-height: 1.65; }
#cmj-attendees input[name$="[dial_code]"] { max-width: 150px; }
#cmj-attendees { clear: both; width: 100%; margin: 32px 0; color: #09283e; }
#cmj-attendees .cmj-attendees-header { background: #09283e; color: #fff; padding: 24px; border-radius: 8px; margin-bottom: 16px; }
#cmj-attendees .cmj-attendees-header h3 { color: #fff; margin: 0 0 10px; }
#cmj-attendees .cmj-progress { color: #fff; margin: 0; padding: 0; }
#cmj-attendees .cmj-person { border: 1px solid #bccbd1; border-radius: 8px; margin: 18px 0; background: #fff; overflow: hidden; }
#cmj-attendees summary { cursor: pointer; padding: 20px; background: #eef5f6; font-weight: 700; }
#cmj-attendees summary:focus-visible, #cmj-attendees button:focus-visible { outline: 3px solid #c56b09; outline-offset: -3px; }
#cmj-attendees .cmj-person-status { display: inline-block; font-size: .85em; font-weight: 400; margin-left: 16px; }
#cmj-attendees [data-complete="true"] .cmj-person-status { color: #166534; font-weight: 700; }
#cmj-attendees fieldset { border: 0; padding: 18px 24px; margin: 16px 0 0; min-width: 0; }
#cmj-attendees legend { font-weight: 700; font-size: 1.15em; padding: 0; }
#cmj-attendees .cmj-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
#cmj-attendees .cmj-fields .form-row { float: none; width: 100%; min-width: 0; margin: 0; padding: 0; }
#cmj-attendees .cmj-fields .cmj-country-field { grid-column: 1 / -1; }
#cmj-attendees .cmj-phone-fields { display: grid; grid-template-columns: minmax(80px, 105px) minmax(0, 1fr); gap: 8px 12px; min-width: 0; }
#cmj-attendees .cmj-phone-fields input { width: 100%; box-sizing: border-box; }
#cmj-attendees .cmj-phone-help { grid-column: 1 / -1; font-size: .85em; line-height: 1.4; }
#cmj-attendees input, #cmj-attendees select { max-width: 100%; }
#cmj-attendees .select2-container { width: 100% !important; }
#cmj-attendees h4 { margin: 18px 0 12px; }
#cmj-attendees button.button { background: #a6d5dd; color: #09283e; box-shadow: 3px 3px 0 #f5df69; border: 0; font-size: 1.3em; white-space: normal; line-height: 1.4; }
#cmj-attendees button.button:hover { background: #f39a43; }
#cmj-attendees .cmj-next { margin: 0 24px 24px; }
#cmj-attendees .cmj-person-error { margin: 0 24px 16px; color: #9f241b; }
#cmj-attendees .cmj-person-error[data-state="success"] { color: #166534; }
#cmj-attendees .cmj-person-error[data-state="error"] { color: #9f241b; }
#cmj-attendees .cmj-copy-feedback { margin-top: 12px; }
@media (max-width: 600px) {
    #cmj-attendees .cmj-fields { grid-template-columns: 1fr; }
    #cmj-attendees .cmj-person-status { display: block; margin: 6px 0 0; }
    #cmj-attendees fieldset { padding: 14px; }
    #cmj-attendees .cmj-next { margin-left: 14px; margin-right: 14px; }
}

/* The spinner exists only while automatic status checking is active. */
.cmj-payment-status[data-cmj-loading="true"]::after,
.cmj-reservation-label[data-cmj-loading="true"]::after {
    content: "";
    display: inline-block;
    width: .9em;
    height: .9em;
    margin-inline-start: .65em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    box-sizing: content-box;
    vertical-align: -.15em;
    animation: cmj-status-spin .8s linear infinite;
}
@keyframes cmj-status-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .cmj-payment-status[data-cmj-loading="true"]::after,
    .cmj-reservation-label[data-cmj-loading="true"]::after { animation: none; }
}

/* 0.3.0: Cumbre + Tour (opcional). Without JS the extra fields stay visible. */
#cmj-attendees .cmj-tour { background: #fffbea; border-top: 1px solid #f5df69; }
#cmj-attendees .cmj-tour[data-on="false"] .cmj-tour-fields { display: none; }
#cmj-attendees .cmj-tour-info, #cmj-attendees .cmj-tour-free { margin: 6px 0; }
#cmj-attendees .cmj-tour-free { font-weight: 700; }
#cmj-attendees .cmj-tour label.checkbox { font-weight: 700; font-size: 1.05em; }
#cmj-attendees .cmj-tour input[disabled] + span { opacity: .55; }
#cmj-attendees .cmj-tour .optional { display: none; }
/* 0.3.1: data-processing authorization above the place-order button. */
.cmj-consent { clear: both; margin: 0 0 24px; padding: 16px; border: 1px solid #bccbd1; border-radius: 8px; background: #fff; font-size: .9em; line-height: 1.5; }
.cmj-consent label { display: block; }
.cmj-consent input { margin-right: 6px; }
/* 0.3.3: USD reference (display only). */
.cmj-usd { font-weight: 400; opacity: .85; white-space: nowrap; }
.cmj-usd-note { display: block; font-weight: 400; font-size: .8em; opacity: .8; }

/* ===================== 0.3.5: checkout and cart usability ===================== */
body.woocommerce-checkout, body.woocommerce-cart { --cmj-ink: #02233e; --cmj-teal: #11a3a5; --cmj-line: #8b9ba7; --cmj-err: #b42318; }
/* Inputs: white, dark text, clear border and focus (overrides Divi's grey fields). */
body.woocommerce-checkout form.checkout .form-row .input-text,
body.woocommerce-checkout form.checkout .form-row select,
body.woocommerce-checkout form.checkout .select2-container--default .select2-selection--single,
body.woocommerce-cart .woocommerce-cart-form input.qty {
    background: #fff !important; color: var(--cmj-ink) !important; border: 1px solid var(--cmj-line) !important;
    border-radius: 4px !important; font-size: 16px !important; line-height: 1.4 !important; box-shadow: none !important;
}
body.woocommerce-checkout form.checkout .form-row .input-text, body.woocommerce-checkout form.checkout .form-row select { padding: 12px 14px !important; min-height: 48px; box-sizing: border-box; width: 100%; }
body.woocommerce-checkout form.checkout .select2-container--default .select2-selection--single { height: 48px !important; display: flex; align-items: center; }
body.woocommerce-checkout form.checkout .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--cmj-ink) !important; line-height: 46px !important; padding-left: 14px !important; }
body.woocommerce-checkout form.checkout .select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px !important; }
body.woocommerce-checkout form.checkout .input-text::placeholder { color: #5b6b77 !important; opacity: 1; }
body.woocommerce-checkout form.checkout .form-row .input-text:focus, body.woocommerce-checkout form.checkout .form-row select:focus,
body.woocommerce-checkout form.checkout .select2-container--focus .select2-selection, body.woocommerce-cart input.qty:focus {
    outline: 3px solid rgba(17,163,165,.35) !important; outline-offset: 0; border-color: var(--cmj-teal) !important;
}
body.woocommerce-checkout form.checkout .form-row label { color: var(--cmj-ink); font-weight: 600; font-size: 15px; margin-bottom: 6px; }
body.woocommerce-checkout form.checkout abbr.required { color: var(--cmj-err); text-decoration: none; border: 0; }
/* Errors next to each field. */
.cmj-field-error { display: block; color: var(--cmj-err); font-size: 14px; line-height: 1.4; margin-top: 6px; font-weight: 600; }
body.woocommerce-checkout form.checkout .cmj-invalid .input-text, body.woocommerce-checkout form.checkout .cmj-invalid select,
body.woocommerce-checkout form.checkout .cmj-invalid .select2-selection { border: 2px solid var(--cmj-err) !important; }
/* Numbered steps. */
body.woocommerce-checkout .woocommerce-billing-fields > h3, body.woocommerce-checkout #order_review_heading, body.woocommerce-checkout .cmj-step-title {
    color: var(--cmj-ink); font-size: 26px; font-weight: 800; line-height: 1.25; margin: 40px 0 8px; padding: 18px 0 0; border-top: 3px solid var(--cmj-teal);
}
body.woocommerce-checkout .woocommerce-billing-fields > h3 { margin-top: 8px; }
.cmj-step-help { color: #3d5160; margin: 0 0 18px; font-size: 15px; line-height: 1.5; }
/* Buyer: one full-width column with a two-column grid of six fields. */
body.woocommerce-checkout #customer_details.col2-set .col-1, body.woocommerce-checkout #customer_details.col2-set .col-2 { width: 100%; float: none; }
body.woocommerce-checkout #customer_details.col2-set .col-2:not(:has(.form-row)) { display: none; }
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; }
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row { width: auto !important; float: none !important; margin: 0 0 12px !important; padding: 0 !important; }
/* Participants. */
#cmj-attendees { margin-top: 24px; }
#cmj-attendees .cmj-attendees-header { background: #eef5f6; color: var(--cmj-ink); padding: 12px 18px; border-radius: 6px; margin: 0 0 12px; }
#cmj-attendees .cmj-progress { color: var(--cmj-ink); font-weight: 700; }
#cmj-attendees summary { font-size: 18px; color: var(--cmj-ink); }
#cmj-attendees legend { color: var(--cmj-ink); }
#cmj-attendees .cmj-copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 4px; }
#cmj-attendees .cmj-copy-hint { font-size: 14px; color: #3d5160; }
#cmj-attendees button.button.cmj-copy { font-size: 16px; padding: 10px 16px; }
#cmj-attendees .cmj-ws-block h4 { font-size: 18px; font-weight: 800; color: var(--cmj-ink); margin: 20px 0 8px; padding-bottom: 6px; border-bottom: 1px solid #d5dee3; }
#cmj-attendees .cmj-fields.cmj-workshop-fields { grid-template-columns: 1fr; }
#cmj-attendees .cmj-workshop-row select { white-space: normal; text-overflow: ellipsis; }
#cmj-attendees .cmj-ws-picked { display: block; margin-top: 6px; font-size: 14px; line-height: 1.4; color: #0b6466; font-weight: 600; }
#cmj-attendees .cmj-ws-picked:empty { display: none; }
#cmj-attendees .cmj-person-error:empty { display: none; }
#cmj-attendees .cmj-person-error { font-weight: 600; }
#cmj-attendees button.button.cmj-next { font-size: 17px; padding: 12px 20px; }
/* Tour. */
#cmj-attendees .cmj-tour legend { font-size: 18px; }
#cmj-attendees .cmj-tour-required .optional { display: none; }
#cmj-attendees .cmj-tour .cmj-tour-free { font-weight: 700; color: #7a4b00; white-space: nowrap; }
#cmj-attendees .cmj-tour-check label.checkbox { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; font-size: 16px; line-height: 1.45; cursor: pointer; }
#cmj-attendees .cmj-tour-check input[type=checkbox] { width: 22px; height: 22px; flex: 0 0 22px; margin: 1px 0 0; accent-color: var(--cmj-teal); }
#cmj-attendees .cmj-tour-sensitive { grid-column: 1 / -1; margin: 0; }
#cmj-attendees .cmj-tour .cmj-usd { font-weight: 400; color: #5b6b77; }
/* Consent (step 3). */
.cmj-consent-step { clear: both; margin: 8px 0 24px; }
.cmj-consent { margin: 0 !important; padding: 18px !important; border: 1px solid #bccbd1; border-radius: 8px; background: #fff; font-size: 15px !important; line-height: 1.55 !important; color: var(--cmj-ink); }
.cmj-consent label.checkbox { display: grid !important; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-weight: 600 !important; cursor: pointer; }
.cmj-consent input[type=checkbox] { width: 24px; height: 24px; margin: 0 !important; accent-color: var(--cmj-teal); }
.cmj-consent-full { margin: 10px 0 0 38px; font-size: 14px; color: #3d5160; }
.cmj-consent-full summary { cursor: pointer; color: #0b6466; font-weight: 700; }
.cmj-consent .cmj-field-error { margin-left: 38px; }
/* Summary and payment (step 4). */
body.woocommerce-checkout #order_review { margin-top: 8px; }
body.woocommerce-checkout .cmj-cop { font-weight: 700; }
body.woocommerce-checkout .order-total .cmj-usd, body.woocommerce-checkout .cmj-tour-fee .cmj-usd, body.woocommerce-checkout .shop_table .cmj-usd { font-size: .85em; color: #5b6b77; font-weight: 400; }
body.woocommerce-checkout .cmj-stage-note { font-size: 14px; color: #3d5160; margin: 12px 0; }
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper .form-row label.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 600; }
body.woocommerce-checkout #terms { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--cmj-teal); }
body.woocommerce-checkout #place_order { width: 100%; float: none; background: var(--cmj-teal) !important; color: var(--cmj-ink) !important; border: 0 !important; border-radius: 0; box-shadow: 8px 8px 0 #fcf089; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 18px 24px !important; font-size: 18px !important; }
body.woocommerce-checkout #place_order:hover { background: #f89a44 !important; }
body.woocommerce-checkout #place_order::after { display: none; }
/* Cart: real-looking quantity field, auto-update instead of the button. */
body.woocommerce-cart .woocommerce-cart-form input.qty { width: 80px !important; padding: 10px !important; text-align: center; }
body.cmj-cart-auto .woocommerce-cart-form button[name="update_cart"] { display: none !important; }
body.woocommerce-cart .cmj-cop { font-weight: 700; }
body.woocommerce-cart .order-total .cmj-usd { font-size: .85em; color: #5b6b77; }
@media (max-width: 767px) {
    body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper { grid-template-columns: 1fr; }
    body.woocommerce-checkout .woocommerce-billing-fields > h3, body.woocommerce-checkout #order_review_heading, body.woocommerce-checkout .cmj-step-title { font-size: 22px; }
    #cmj-attendees summary { padding: 16px; }
    #cmj-attendees button.button.cmj-next, #cmj-attendees button.button.cmj-copy { width: 100%; }
    .cmj-consent-full, .cmj-consent .cmj-field-error { margin-left: 0; }
    body.woocommerce-checkout .shop_table td, body.woocommerce-checkout .shop_table th { padding: 10px 8px !important; }
}

/* 0.3.6: tour box fully inside the participant card; legend as a normal heading; button below with spacing. */
#cmj-attendees fieldset.cmj-tour { box-sizing: border-box; margin: 20px 24px 0; padding: 18px 20px 20px; border: 1px solid #ecd77a; border-top: 1px solid #ecd77a; border-radius: 8px; background: #fffbea; max-width: calc(100% - 48px); }
#cmj-attendees fieldset.cmj-tour > legend { float: left; width: 100%; padding: 0; margin: 0 0 8px; font-size: 18px; line-height: 1.3; font-weight: 800; color: var(--cmj-ink, #02233e); white-space: normal; }
#cmj-attendees fieldset.cmj-tour > legend + * { clear: both; }
#cmj-attendees fieldset.cmj-tour .cmj-tour-free { white-space: normal; }
#cmj-attendees fieldset.cmj-tour .cmj-tour-check { margin: 12px 0 0; padding: 0; }
#cmj-attendees fieldset.cmj-tour .cmj-tour-fields { margin-top: 14px; }
#cmj-attendees .cmj-person-error { margin-top: 16px; }
#cmj-attendees button.button.cmj-next { display: inline-block; box-sizing: border-box; margin: 20px 24px 24px; max-width: calc(100% - 48px); }
@media (max-width: 600px) {
    #cmj-attendees fieldset.cmj-tour { margin: 16px 14px 0; padding: 14px 14px 16px; max-width: calc(100% - 28px); }
    #cmj-attendees button.button.cmj-next { display: block; width: calc(100% - 28px); max-width: none; margin: 18px 14px 18px; }
    #cmj-attendees button.button.cmj-copy { width: 100%; box-sizing: border-box; }
}

/* 0.3.7: tidy tour block. */
#cmj-attendees fieldset.cmj-tour .cmj-tour-info { font-size: 14px; line-height: 1.5; margin: 0 0 8px; color: #22384a; }
#cmj-attendees fieldset.cmj-tour .cmj-tour-costs a { color: #0b6466; font-weight: 700; text-decoration: underline; }
#cmj-attendees fieldset.cmj-tour .cmj-tour-sensitive small { font-size: 13px; color: #4a5d6b; }
