/* =================================================================
   Business submission widget (onboarding / one-question-per-screen)
   Loaded by [bm_business_submission_form_widget] shortcode.
   Visually distinct from business-form.css so the two forms can
   coexist without selector collisions.

   A note on !important: bip-ui.css declares `.bip-btn-* {
   display: inline-flex !important }`. We use a `.is-hidden` utility
   with `display:none !important` *plus* a more-specific selector for
   the footer buttons so a class toggle in JS actually hides them.
   ================================================================= */

/* Generic visibility utility — beats bip-ui.css's button !important
   and the widget's own per-button !important (the AI button forces
   `display: inline-flex !important`, so we need an equally-specific
   rule to hide it). */
.bmw-container .is-hidden,
.bmw-footer .bmw-prev.is-hidden,
.bmw-footer .bmw-next.is-hidden,
.bmw-footer .bmw-submit.is-hidden,
.bmw-image-pick.is-hidden,
.bmw-ai-btn.is-hidden { display: none !important; }

/* ---------- Container + Card ---------- */

.bmw-container {
    width: 100%;
    max-width: 720px;
    margin: 40px auto !important;
    padding: 0 16px;
    box-sizing: border-box;
    color: #1f2933;
    font-family: inherit;
}

.bmw-container * { box-sizing: border-box; }

.bmw-form { width: 100%; }

.bmw-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(15, 35, 60, 0.08), 0 1px 2px rgba(15, 35, 60, 0.04);
    padding: 48px 48px 24px;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

@media (max-width: 560px) {
    .bmw-card { padding: 32px 22px 18px; min-height: 420px; border-radius: 10px; }
    .bmw-container { margin: 16px auto !important; padding: 0 12px; }
}

/* ---------- Steps ----------
   The active step is vertically centered within the card body so short
   screens (Yes/No tiles, Email) feel balanced, while long screens (the
   Address screen, the Review recap) still fill naturally because they
   outgrow the available space. `justify-content: center` on the flex
   parent does the work; the active step is the only flex item that
   isn't display:none. */

.bmw-steps {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0; /* allow children to overflow when content is taller than the card */
}

.bmw-step {
    display: none;
    animation: bmwFadeIn 240ms ease;
    width: 100%;
}

.bmw-step.is-current {
    display: block;
}

@keyframes bmwFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bmw-question {
    margin: 0 0 8px !important;
    font-size: 28px !important;
    line-height: 1.25;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
    color: #0f1c2c;
}

/* Chevron-right separators inside the question heading
   (Search › Find › Select on the gmb-search step). Smaller and
   muted so they read as separators rather than headline glyphs. */
.bmw-question .bmw-chev {
    font-size: 0.55em !important;
    color: #98a2ad;
    margin: 0 8px !important;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

/* "(optional)" hint inline beside a question heading. Smaller +
   muted so it reads as parenthetical, not part of the headline. */
.bmw-question-hint {
    display: inline-block;
    margin-left: 8px !important;
    font-size: 0.55em !important;
    font-weight: 500 !important;
    color: #98a2ad;
    letter-spacing: 0;
    vertical-align: middle;
    position: relative;
    top: -3px;
}

.bmw-help {
    margin: 0 0 28px !important;
    font-size: 15px !important;
    line-height: 1.55;
    color: #5b6573;
}

/* Field labels — sentence case in the HTML, so no transform here. The
   previous uppercase rule turned the social platform names into shouty
   labels (FACEBOOK, INSTAGRAM…); plain-cased reads cleaner and lets
   "X (Twitter)" / "LinkedIn" / "TikTok" keep their natural casing. */
.bmw-label {
    display: block;
    margin: 0 0 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0;
    text-transform: none;
    color: #1f2933;
}

/* Required-field marker: red asterisk appended to the label. Matches
   the convention business-form.css uses on the existing form, so the
   two forms have the same visual cue for "this is required". */
.bmw-label.bmw-required::after {
    content: '*';
    color: #d9534f;
    margin-left: 4px !important;
    font-weight: 700 !important;
}

.bmw-optional {
    color: #98a2ad;
    font-weight: 400 !important;
    letter-spacing: 0;
}

/* Inline hint shown directly under a field (e.g. the email step's
   "We'll send credentials here" line). Smaller + muted so it doesn't
   compete with the field label or the question heading. */
.bmw-field-hint {
    display: block;
    margin-top: 6px !important;
    color: #687485;
    font-size: 12.5px !important;
    line-height: 1.45;
}

@media (max-width: 560px) {
    .bmw-question { font-size: 22px !important; }
    .bmw-help     { font-size: 14px !important; margin-bottom: 20px !important; }
}

/* ---------- Inputs ----------
   The whole input family — text, email, url, select, textarea — uses
   the same border, radius, focus ring, and invalid state. !important
   on the base + focus rules so themes that ship their own input
   resets (Hello Elementor, Astra, etc.) don't half-undo the widget's
   look. */

.bmw-field { margin-bottom: 18px !important; }

.bmw-input {
    display: block !important;
    width: 100% !important;
    padding: 14px 16px !important;
    border: 1.5px solid #dfe4ea !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    background: #fff !important;
    color: #1f2933 !important;
    font-family: inherit !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.bmw-input::placeholder { color: #98a2ad !important; opacity: 1; }

.bmw-input:hover { border-color: #c6cdd5 !important; }

.bmw-input:focus,
.bmw-input:focus-visible {
    outline: none !important;
    border-color: #1590C5 !important;
    box-shadow: 0 0 0 3px rgba(21, 144, 197, 0.18) !important;
    background: #fff !important;
}

.bmw-input.is-invalid {
    border-color: #d9534f !important;
    box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.14) !important;
}

.bmw-input.is-invalid:focus {
    border-color: #d9534f !important;
    box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.22) !important;
}

/* Read-only state (used by the Email field when the visitor is logged
   in — value comes from their WP account and can't be edited). Muted
   background + default cursor make it obvious the field isn't a
   typeable input, without changing the layout. */
.bmw-input[readonly] {
    background: #f4f6f8 !important;
    color: #5b6573 !important;
    cursor: default !important;
}
.bmw-input[readonly]:focus,
.bmw-input[readonly]:hover {
    border-color: #dfe4ea !important;
    box-shadow: none !important;
}

.bmw-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23687485' d='M6 8 0 0h12z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 40px !important;
    cursor: pointer;
}

.bmw-textarea {
    resize: vertical !important;
    min-height: 180px !important;
    line-height: 1.55 !important;
}

.bmw-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 560px) {
    .bmw-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Tiles (Yes/No, Location/Area choice cards) ---------- */
/* Horizontal layout: round colour-coded icon on the left, title + sub
   on the right. The active state keeps the same light background as
   rest — only the border + icon ring brighten — so neither tile ever
   takes on a heavy dark fill against the card. */

.bmw-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.bmw-tile {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 16px 18px !important;
    border: 2px solid #dfe4ea !important;
    border-radius: 10px !important;
    background: #fbfcfd !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
    font-family: inherit !important;
    color: #1f2933 !important;
    width: 100%;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
}

.bmw-tile:hover {
    border-color: #b9c5d2 !important;
    transform: translateY(-1px);
    background: #fff !important;
}

.bmw-tile.is-active {
    border-color: #1590C5 !important;
    background: linear-gradient(180deg, #f3f9fc 0%, #ffffff 100%) !important;
    box-shadow: 0 4px 14px rgba(21, 144, 197, 0.12) !important;
}

.bmw-tile-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px !important;
    line-height: 1;
    background: #e6eaef;
    color: #687485;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

/* Colour variants — applied always (active or not) so the meaning is
   conveyed even when the tile isn't selected. */
.bmw-tile-yes  .bmw-tile-icon { background: #e2f5e6; color: #00a72c; }
.bmw-tile-no   .bmw-tile-icon { background: #fde2e2; color: #d9534f; }
.bmw-tile-loc  .bmw-tile-icon { background: #e3f1f9; color: #1590C5; }
.bmw-tile-area .bmw-tile-icon { background: #fff1e0; color: #d97706; }

.bmw-tile.is-active .bmw-tile-icon { transform: scale(1.05); }

.bmw-tile-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bmw-tile-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0f1c2c;
    line-height: 1.25;
}

.bmw-tile-sub {
    font-size: 13px !important;
    color: #687485;
    line-height: 1.4;
    text-wrap: auto;
}

@media (max-width: 560px) {
    .bmw-tiles { grid-template-columns: 1fr; }
    .bmw-tile { padding: 14px 14px !important; }
    .bmw-tile-icon { width: 38px; height: 38px; font-size: 15px !important; }
}

/* ---------- GMB search input ----------
   Right-side indicator: a spinner while the user is typing or has
   edited a previously-selected value, a green check once a real
   Place is picked from the dropdown. Neither shown when the field
   is empty. The wrap carries `.is-typing` or `.has-selection` (JS
   manages those classes) — see ensureAutocomplete / syncSearchIndicator
   in business-form-widget.js. */

.bmw-search-wrap { position: relative; }

/* Always reserve room on the right so the text never slides under
   the indicator when it appears. */
.bmw-search-wrap .bmw-input { padding-right: 48px !important; }

/* The two indicators share the same anchor point; only one is ever
   visible at a time (driven by classes on the wrap). */
.bmw-search-check,
.bmw-search-spinner {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* ---- check mark (selected) ---- */
.bmw-search-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00a72c;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px !important;
    box-shadow: 0 2px 6px rgba(0, 167, 44, 0.25);
}
.bmw-search-wrap.has-selection .bmw-search-check { display: inline-flex; }
.bmw-search-wrap.has-selection .bmw-input { border-color: #00a72c !important; }

/* ---- spinner (typing / editing after selection) ---- */
.bmw-search-spinner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2.5px solid #e6eaef;
    border-top-color: #1590C5;
    display: none;
    animation: bmwSearchSpin 0.7s linear infinite;
}
.bmw-search-wrap.is-typing .bmw-search-spinner { display: block; }

/* When typing, the check must be hidden — even if the .has-selection
   class momentarily lingers (it won't, because the input handler
   clears it, but belt-and-braces). */
.bmw-search-wrap.is-typing .bmw-search-check { display: none; }

@keyframes bmwSearchSpin { to { transform: translateY(-50%) rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .bmw-search-spinner { animation-duration: 1.8s; }
}

.bmw-place-id-details {
    margin-top: 12px !important;
    font-size: 14px !important;
}
.bmw-place-id-details summary {
    cursor: pointer;
    color: #1590C5;
    font-weight: 500 !important;
    padding: 8px 0;
}
.bmw-place-id-details summary:hover { text-decoration: underline; }
.bmw-place-id-details[open] summary { margin-bottom: 8px !important; }

/* ---------- Category step ---------- */

.bmw-fixed-category {
    background: #f3f5f8;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 500 !important;
    color: #1f2933;
    border: 1px solid #dfe4ea;
}

.bmw-category-wrapper {
    display: flex !important;
    gap: 12px;
    flex-wrap: wrap;
}
.bmw-category-wrapper > select.bmw-input {
    flex: 1 1 220px !important;
    min-width: 0;
    width: auto !important;
}

/* ---------- Tag selector (widget context) ----------
   Layers on top of tag-selector.css base styles. Brand-blue focus
   ring, brand-blue tinted chips matching the rest of the widget look. */

/* Label-row: "Tags" left, counter pill right. */
.bmw-tag-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 6px !important;
}
.bmw-tag-label-row .bmw-label { margin: 0 !important; }
.bmw-tag-label-row .bip-tag-count { margin-left: 0 !important; font-size: 12.5px !important; }

.bmw-tag-selector .bip-tag-chips {
    border: 1.5px solid #dfe4ea !important;
    border-radius: 8px !important;
    background: #fff !important;
    padding: 8px 10px !important;
    min-height: 52px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bmw-tag-selector .bip-tag-chips:focus-within {
    border-color: #1590C5 !important;
    box-shadow: 0 0 0 3px rgba(21, 144, 197, 0.18) !important;
}
.bmw-tag-selector .bip-tag-chip {
    background: rgba(21, 144, 197, 0.10) !important;
    color: #0f4d6a !important;
    border-radius: 999px !important;
    padding: 4px 4px 4px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}
/* Cross button — transparent bg, red glyph, no fill on hover. Every
   property forced so nothing further down the cascade (theme button
   styles, .bip-btn rules, etc.) can repaint it. */
.bmw-tag-selector .bip-tag-chip-remove,
.bmw-tag-selector .bip-tag-chip-remove:hover,
.bmw-tag-selector .bip-tag-chip-remove:focus,
.bmw-tag-selector .bip-tag-chip-remove:active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #d9534f !important;
    padding: 0 !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 1 !important;
    font-size: 18px !important;
    cursor: pointer !important;
    outline: none !important;
    text-shadow: none !important;
}
.bmw-tag-selector .bip-tag-chip-remove:hover,
.bmw-tag-selector .bip-tag-chip-remove:focus {
    color: #b03a37 !important;
    transform: scale(1.15) !important;
}
.bmw-tag-selector .bip-tag-input {
    font-size: 14px !important;
}
.bmw-tag-selector .bip-tag-dropdown {
    border-radius: 8px;
    border-color: #dfe4ea;
}

/* ---------- Description step ---------- */

/* Toolbar row below the textarea — AI button left, word counter right.
   Replaces the old absolute-inside-the-textarea layout the AI button
   used to have; sitting under the field is less cluttered and makes
   the gradient pill the visual anchor of the section instead of an
   overlay on the typing area. */
.bmw-desc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px !important;
    flex-wrap: wrap;
}

/* ---- AI Generate button ----
   Pure custom button (no bip-btn classes) so the gradient + sparkles
   own the styling end-to-end. Sits below the textarea on the left;
   an animated gradient sweeps across the surface, a soft diagonal
   sheen wipes across every few seconds, and two pinprick sparkles
   twinkle at opposing corners. */
.bmw-ai-btn {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 0 14px !important;
    height: 34px !important;
    border: 0 !important;
    border-radius: 999px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #fff !important;
    cursor: pointer !important;
    line-height: 1 !important;
    overflow: visible !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22) !important;
    /* Multi-stop AI gradient — indigo → purple → fuchsia → amber →
       fuchsia → indigo. Long background-size lets us slide it
       continuously without a visible "seam". */
    background: linear-gradient(110deg,
        #6366f1 0%,
        #8b5cf6 18%,
        #d946ef 36%,
        #f59e0b 52%,
        #d946ef 68%,
        #8b5cf6 86%,
        #6366f1 100%) !important;
    background-size: 300% 100% !important;
    box-shadow:
        0 4px 14px rgba(139, 92, 246, 0.42),
        0 1px 3px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
    animation: bmwAiGradient 7s linear infinite;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
}
.bmw-ai-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow:
        0 8px 22px rgba(139, 92, 246, 0.55),
        0 1px 3px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}
.bmw-ai-btn:focus { outline: none !important; }
.bmw-ai-btn:focus-visible {
    outline: 2px solid #8b5cf6 !important;
    outline-offset: 3px !important;
}

.bmw-ai-wand    { font-size: 14px !important; }
.bmw-ai-label   { letter-spacing: 0.02em; }

/* Diagonal sheen that sweeps across the pill every few seconds. */
.bmw-ai-sheen {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}
.bmw-ai-sheen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 50%;
    height: 200%;
    background: linear-gradient(120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.55) 50%,
        transparent 100%);
    transform: skewX(-20deg);
    animation: bmwAiSheen 4.5s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* Two tiny twinkle dots that orbit the pill at opposing corners. */
.bmw-ai-btn::before,
.bmw-ai-btn::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px 1px rgba(255, 255, 255, 0.95);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}
.bmw-ai-btn::before {
    top: -4px;
    right: 16px;
    animation: bmwAiTwinkleA 2.4s ease-in-out infinite;
}
.bmw-ai-btn::after {
    bottom: -4px;
    left: 22px;
    animation: bmwAiTwinkleB 2.7s ease-in-out infinite;
}

/* Loading-state — wand spins, sheen pauses (so it doesn't look like
   the gradient is fighting the spinner). */
.bmw-ai-btn.is-loading {
    animation-play-state: paused !important;
    pointer-events: none;
}
.bmw-ai-btn.is-loading .bmw-ai-wand { animation: bmwSpin 0.8s linear infinite; }
.bmw-ai-btn.is-loading .bmw-ai-sheen::before { animation-play-state: paused; }

@keyframes bmwSpin       { to { transform: rotate(360deg); } }
@keyframes bmwAiGradient { 0% { background-position:   0% 50%; }
                           100% { background-position: 300% 50%; } }
@keyframes bmwAiSheen    { 0%   { left: -60%; }
                           70%  { left: 160%; }
                           100% { left: 160%; } }
@keyframes bmwAiTwinkleA { 0%, 100% { opacity: 0; transform: scale(0.3); }
                           50%      { opacity: 1; transform: scale(1.2); } }
@keyframes bmwAiTwinkleB { 0%, 100% { opacity: 0; transform: scale(0.3); }
                           50%      { opacity: 0.85; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
    .bmw-ai-btn,
    .bmw-ai-sheen::before,
    .bmw-ai-btn::before,
    .bmw-ai-btn::after { animation: none !important; }
}

.bmw-counter {
    font-size: 12.5px !important;
    color: #687485;
    white-space: nowrap;
}
.bmw-counter.is-over .bmw-counter-num { color: #d9534f; font-weight: 600 !important; }

/* ---------- Social grid ---------- */

.bmw-social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
}
.bmw-social-grid .bmw-field { margin-bottom: 0 !important; }

@media (max-width: 560px) {
    .bmw-social-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- Image step ---------- */

.bmw-image-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 2px dashed #dfe4ea;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    background: #fafbfc;
    transition: border-color 0.15s ease, background 0.15s ease;
    min-height: 220px;
}

.bmw-image-wrap:hover { border-color: #1590C5; background: #f4faff; }

/* Pick button (pure custom — same visual language as other widget
   ghost buttons but owns its own styling so the theme can't bleed
   in). */
.bmw-image-pick {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 18px !important;
    height: 42px !important;
    background: #fff !important;
    color: #1590C5 !important;
    border: 1.5px solid #1590C5 !important;
    border-radius: 8px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    line-height: 1 !important;
}
.bmw-image-pick:hover { background: #1590C5 !important; color: #fff !important; }
.bmw-image-pick i { font-size: 15px !important; }

.bmw-image-preview {
    position: relative;
    display: inline-block;
    max-width: 100%;
}
.bmw-image-preview img {
    max-width: 100%;
    max-height: 280px;
    border-radius: 8px;
    display: block;
    box-shadow: 0 6px 18px rgba(15, 35, 60, 0.12);
}

/* The remove cross — solid red circle with a white × glyph, hovers
   into darker red. !important everywhere because theme button styles
   were repainting the background and removing the round corners on
   the preview overlay. */
.bmw-image-remove {
    position: absolute !important;
    top: -12px !important;
    right: -12px !important;
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 2px solid #fff !important;
    background: #d9534f !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22) !important;
    transition: background 0.15s ease, transform 0.15s ease !important;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit !important;
    z-index: 2;
}
.bmw-image-remove:hover  { background: #b03a37 !important; transform: scale(1.06); }
.bmw-image-remove:focus  { outline: none !important; }
.bmw-image-remove:focus-visible {
    outline: 2px solid #d9534f !important;
    outline-offset: 2px !important;
}
.bmw-image-remove i { pointer-events: none; }

.bmw-image-error {
    margin: 12px 0 0 !important;
    color: #d9534f;
    font-size: 14px !important;
    min-height: 1em;
}

/* ---------- Review step ---------- */

.bmw-review {
    border: 1px solid #e6eaef;
    border-radius: 10px;
    background: #fafbfc;
    padding: 8px 0;
}

.bmw-review-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid #eef1f5;
}
.bmw-review-row:last-child { border-bottom: 0; }

.bmw-review-key {
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #687485;
    font-weight: 600 !important;
    flex: 0 0 38%;
}

.bmw-review-val {
    font-size: 15px !important;
    color: #1f2933;
    flex: 1 1 auto;
    word-break: break-word;
    text-align: right;
}

.bmw-review-val.is-empty {
    color: #b0b8c1;
    font-style: italic;
}

.bmw-review-thumb img {
    max-width: 88px;
    max-height: 88px;
    border-radius: 6px;
    border: 1px solid #dfe4ea;
}

/* ---------- Footer (prev / dots / next) ---------- */

.bmw-footer {
    margin-top: 28px !important;
    padding-top: 18px;
    border-top: 1px solid #eef1f5;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

/* Prev sits left, dots center, Next/Submit right. Only one of
   Next/Submit is visible at a time (the other carries `.is-hidden`),
   so they share the same grid cell visually without wrapping. */
.bmw-footer .bmw-prev   { justify-self: start; grid-column: 1; }
.bmw-footer .bmw-dots   { grid-column: 2; }
.bmw-footer .bmw-next,
.bmw-footer .bmw-submit { justify-self: end; grid-column: 3; }

.bmw-prev[disabled] { visibility: hidden; }

.bmw-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-self: center;
}

.bmw-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dfe4ea;
    transition: background 0.15s ease, transform 0.15s ease, width 0.15s ease;
}
.bmw-dot.is-done   { background: #1590C5; }
.bmw-dot.is-active { background: #1590C5; width: 22px; border-radius: 4px; }

@media (max-width: 560px) {
    .bmw-footer {
        grid-template-columns: auto 1fr auto;
        gap: 8px;
    }
    .bmw-prev,
    .bmw-next,
    .bmw-submit {
        height: 38px !important;
        padding: 0 12px !important;
        font-size: 14px !important;
    }
}

/* ---------- Success view ----------
   Same slot as the loader pane — kicks in when `.is-success` lands on
   the form. Hidden by default; CSS class swap is the single source of
   visibility (no jQuery .show()/.hide() involved, which sidesteps the
   inline-style-vs-!important conflict that previously kept the success
   card hidden after submit completed). */

.bmw-success {
    display: none;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 16px;
    animation: bmwFadeIn 320ms ease;
}
.bmw-form.is-success .bmw-steps        { display: none; }
.bmw-form.is-success .bmw-loading-pane { display: none; }
.bmw-form.is-success .bmw-footer       { display: none; }
.bmw-form.is-success .bmw-success      { display: flex; }

.bmw-success-icon {
    width: 84px;
    height: 84px;
    margin: 0 0 18px !important;
    border-radius: 50%;
    background: #e6f7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00a72c;
    font-size: 44px !important;
    flex-shrink: 0;
}

.bmw-success-title {
    margin: 0 0 12px !important;
    font-size: 26px !important;
    color: #0f1c2c;
    font-weight: 600 !important;
    line-height: 1.25;
    max-width: 520px;
}

/* Main success paragraph — copy mirrors business-form.php's Step 3
   ("In 10 minutes, your X+ listings… we'll email credentials to…"). */
.bmw-success-desc {
    margin: 0 0 18px !important;
    color: #5b6573;
    line-height: 1.6;
    font-size: 15px !important;
    max-width: 520px;
}
.bmw-success-desc [data-success-email] {
    color: #0f1c2c;
}

/* Two-row timeline ("Right now" / "30-60 days"). Same content
   business-form.php shows; styled to fit the widget's centered card. */
.bmw-success-timeline {
    list-style: none;
    padding: 0;
    margin: 0 auto 24px !important;
    text-align: left;
    max-width: 460px;
    width: 100%;
}
.bmw-success-timeline li {
    position: relative;
    padding: 4px 0 4px 28px;
    font-size: 14px !important;
    color: #5b6573;
    line-height: 1.5;
}
.bmw-success-timeline li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1590C5;
}
.bmw-success-timeline li strong {
    color: #1f2933;
    font-weight: 600 !important;
}

/* ---------- Toast-free inline error (under any step) ---------- */

.bmw-step-error {
    margin: 12px 0 0 !important;
    padding: 10px 14px;
    background: #fdecec;
    border: 1px solid #f5c6c6;
    border-radius: 6px;
    color: #b03a37;
    font-size: 14px !important;
    display: none;
}
.bmw-step-error.is-visible { display: block; }

/* ---------- Submit loader ----------
   Sits INLINE in the card's content area (same slot as the active
   step), not as a full-card overlay. When the form has `.is-submitting`
   the steps + footer hide and this pane takes over the slot. Two
   counter-rotating rings, both in the brand-blue family — the inner
   ring uses a low-alpha tint of the same blue so the depth is visual
   (full-strength ring sliding past a faded one) without introducing
   a second hue. */

.bmw-loading-pane {
    display: none;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 16px;
    animation: bmwFadeIn 220ms ease;
}
.bmw-form.is-submitting .bmw-steps   { display: none; }
.bmw-form.is-submitting .bmw-footer  { display: none; }
.bmw-form.is-submitting .bmw-loading-pane { display: flex; }

.bmw-loading-inner { width: 100%; max-width: 320px; }

/* Dual counter-rotating rings — outer in the full brand blue, inner
   in a 45% tint of the same blue. Different speeds + opposite spin
   keep them visually distinct without a second colour. */
.bmw-loading-orbit {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 22px !important;
}
.bmw-loading-orbit::before,
.bmw-loading-orbit::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 3.5px solid transparent;
    box-sizing: border-box;
}
.bmw-loading-orbit::before {
    inset: 0;
    border-top-color: #1590C5;
    border-right-color: #1590C5;
    animation: bmwSpinCw 0.95s cubic-bezier(0.6, 0.05, 0.4, 0.95) infinite;
    filter: drop-shadow(0 6px 16px rgba(21, 144, 197, 0.28));
}
.bmw-loading-orbit::after {
    inset: 10px;
    border-bottom-color: rgba(21, 144, 197, 0.45);
    border-left-color:   rgba(21, 144, 197, 0.45);
    animation: bmwSpinCcw 1.25s cubic-bezier(0.4, 0.1, 0.6, 0.9) infinite;
}

.bmw-loading-text {
    margin: 0 !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #0f1c2c;
    letter-spacing: 0.01em;
}
.bmw-loading-sub {
    margin: 6px 0 0 !important;
    font-size: 13.5px !important;
    color: #687485;
}

@keyframes bmwSpinCw  { to { transform: rotate( 360deg); } }
@keyframes bmwSpinCcw { to { transform: rotate(-360deg); } }

@media (prefers-reduced-motion: reduce) {
    .bmw-loading-orbit::before,
    .bmw-loading-orbit::after { animation-duration: 2.5s !important; }
}
