/* =================================================================
   Business submission form
   Loaded by the [bm_business_submission_form_after_sucessfull_order]
   shortcode (bip-network/business-form.php).
   ================================================================= */

.bm-business-submisssion-form {
    width: 100%;
    max-width: 100%;
    margin: 40px auto;
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.bm-business-submisssion-form label {
    display: block;
    font-weight: 500 !important;
    margin-bottom: 10px;
    font-size: 16px;
}

.bm-business-submisssion-form input:not([type="radio"]):not([type="file"]),
.bm-business-submisssion-form textarea,
.bm-business-submisssion-form select {
    border: 1px solid lightgray !important;
    border-radius: 5px !important;
    margin-bottom: 20px;
}

.bm-business-submisssion-form input:focus,
.bm-business-submisssion-form textarea:focus,
.bm-business-submisssion-form select:focus {
    border-color: #1590C5 !important;
    outline: none;
}

.bm-required:not(input[type="radio"])::after {
    content: "*";
    color: red;
    margin-left: 4px;
}

.bm-help-text {
    margin-bottom: 15px;
    display: block;
    font-size: 14px;
    color: #555;
}

/* Inline "(optional)" hint inside a label */
.bm-form-label-hint {
    color: #888;
    font-weight: 400;
    font-size: 0.9em;
    margin-left: 4px;
}

/* Inline pairs (Phone/Website, City/State, etc.) */
.bm-inline-fields {
    display: flex;
    column-gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.bm-inline-fields > div {
    flex-grow: 1;
    width: 47%;
}

/* Social inputs grid */
.bm-form-section.social .bm-social-desc {
    margin-bottom: 10px;
}
.bm-social-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.bm-social-inputs input {
    margin-bottom: 0 !important;
}

/* SEO interest radio group at the bottom */
.bm-form-section.seo {
    margin-bottom: 20px;
    text-align: left;
}
.bm-form-section.seo .bm-form-label {
    line-height: 1.5 !important;
}
.bm-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.bm-radio-group label:not(.bm-main-radio-label) input[type="radio"] {
    margin-right: 8px;
}

/* =================================================================
   TABS (Yes/No selector + Address/Service Area sub-tabs)
   Classic segmented look:
   - Bordered container, no background of its own
   - Divider line between items
   - Active tab: brand blue background, white text
   - Inactive tab: transparent, light-gray hover
   Every rule uses !important to win against theme defaults.
   ================================================================= */

.bm-tabs {
    display: flex !important;
    gap: 0 !important;
    margin-bottom: 24px !important;
    background: transparent !important;
    padding: 5px !important;
    border: 2px solid #1590C5 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    position: relative !important;
}

.bm-tab {
    flex: 1 1 50% !important;
    text-align: center !important;
    padding: 10px 18px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #333 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: background 0.18s ease, color 0.18s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    position: relative !important;
    z-index: 1 !important;
}

.bm-tab:hover:not(.is-active) {
    background: #f1f3f5 !important;
    color: #1590C5 !important;
}

.bm-tab.is-active {
    background: #1590C5 !important;
    color: #fff !important;
    box-shadow: none !important;
    transform: none !important;
}

.bm-tab .bm-tab-icon {
    font-size: 16px !important;
    line-height: 1 !important;
}

/* Sub-tabs (smaller, same style) */
.bm-tabs.bm-tabs-address-type {
    margin-bottom: 18px !important;
}
.bm-tabs.bm-tabs-address-type .bm-tab {
    padding: 9px 14px !important;
    font-size: 14px !important;
}

@media (max-width: 480px) {
    .bm-tab { font-size: 13px !important; padding: 10px 8px !important; }
    .bm-tab .bm-tab-icon { font-size: 14px !important; }
}

/* =================================================================
   IMAGE UPLOAD
   ================================================================= */

.bm-main-image-section .bm-main-image-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bm-main-image-section .bm-main-image-btn {
    background: #fff;
    border: 1px solid #1590c5;
    color: #1590c5;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.bm-main-image-section .bm-main-image-tile {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #f5f5f5;
    margin-top: 10px;
}
.bm-main-image-section .bm-main-image-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bm-main-image-section .bm-main-image-tile .bm-main-image-remove {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(220, 0, 0, 0.55);
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    border: 0;
    padding: 0;
    transition: none;
}
.bm-main-image-section .bm-main-image-tile:hover .bm-main-image-remove {
    display: flex;
}

/* =================================================================
   AI DESCRIPTION BUTTON
   ================================================================= */

.bm-form-label.bm-description-label {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.bm-generate-business-description-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px !important;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid transparent !important;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}
.bm-generate-business-description-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(90deg, #27A5DD, #3BB6EA, #F472B6, #EC4899, #3BB6EA, #27A5DD);
    background-size: 400% 400%;
    animation: borderFlow 10s linear infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}
.bm-generate-business-description-btn span,
.bm-generate-business-description-btn i {
    background: linear-gradient(90deg, #27A5DD, #3BB6EA, #F472B6, #EC4899, #3BB6EA);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: textFlow 10s ease infinite;
    background-size: 400% 400%;
}
.bm-generate-business-description-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08) !important;
}
.bm-generate-business-description-btn:active {
    transform: translateY(0);
}
.bm-generate-business-description-btn.fast::before {
    animation: borderFlow 2s linear infinite !important;
}
.bm-generate-business-description-btn.fast span,
.bm-generate-business-description-btn.fast i {
    animation: textFlow 2s ease infinite !important;
}

@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes textFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =================================================================
   SUBMIT BUTTON + UTILITY
   ================================================================= */

/* =================================================================
   PROGRESS STEPPER (1 / 2 / Complete) at top of form
   ================================================================= */
.bm-stepper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 0 32px 0 !important;
    gap: 0 !important;
}
.bm-stepper-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
}
.bm-stepper-circle {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #e9ecef !important;
    color: #6c757d !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    border: 2px solid #e9ecef !important;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease !important;
    line-height: 1 !important;
}
.bm-stepper-label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #6c757d !important;
    transition: color 0.25s ease !important;
    line-height: 1 !important;
}
.bm-stepper-bar {
    flex: 1 1 auto !important;
    height: 3px !important;
    background: #e9ecef !important;
    margin: 0 12px !important;
    align-self: flex-start !important;
    margin-top: 17px !important;
    border-radius: 2px !important;
    transition: background 0.25s ease !important;
    min-width: 40px !important;
}
.bm-stepper-bar.is-filled {
    background: #1590C5 !important;
}
.bm-stepper-item .bm-stepper-num   { display: inline-block !important; }
.bm-stepper-item .bm-stepper-check { display: none !important; }
.bm-stepper-item.is-active .bm-stepper-circle,
.bm-stepper-item.is-done   .bm-stepper-circle {
    background: #1590C5 !important;
    color: #fff !important;
    border-color: #1590C5 !important;
}
.bm-stepper-item.is-active .bm-stepper-label,
.bm-stepper-item.is-done   .bm-stepper-label {
    color: #1590C5 !important;
}
.bm-stepper-item.is-done .bm-stepper-num   { display: none !important; }
.bm-stepper-item.is-done .bm-stepper-check { display: inline-block !important; }

@media (max-width: 480px) {
    .bm-stepper-bar { min-width: 20px !important; margin: 0 6px !important; margin-top: 17px !important; }
    .bm-stepper-label { font-size: 12px !important; }
}

/* =================================================================
   STEP 3 — Complete (success) panel
   ================================================================= */
.bm-form-complete {
    text-align: center !important;
    padding: 40px 20px 30px !important;
}
.bm-form-complete-icon {
    font-size: 80px !important;
    color: #00af00 !important;
    margin-bottom: 24px !important;
    line-height: 1 !important;
}
.bm-form-complete-title {
    font-size: 28px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #222 !important;
    line-height: 1.2 !important;
}

/* =================================================================
   STEPS — two-step form transitions + step footers (Next / Back / Submit)
   ================================================================= */

.bm-form-step {
    transition: opacity 0.25s ease, transform 0.25s ease !important;
}
.bm-form-step.is-leaving {
    opacity: 0 !important;
    transform: translateX(-30px) !important;
    pointer-events: none !important;
}
.bm-form-step.is-entering {
    opacity: 0 !important;
    transform: translateX(-30px) !important;
}

.bm-step-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-top: 10px !important;
    gap: 12px !important;
}
.bm-step-actions.bm-step-actions-split {
    justify-content: space-between !important;
}

/* Next / Back / Submit — all share base styling */
.bm-btn-step,
.bm-business-submit-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 22px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    border: 0 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    background: #1590C5 !important;
    color: #fff !important;
    transition: background 0.18s ease, opacity 0.18s ease !important;
    max-width: max-content !important;
    width: auto !important;
}
.bm-btn-step:hover,
.bm-business-submit-btn:hover {
    background: #117ba8 !important;
}
.bm-btn-step:disabled,
.bm-business-submit-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Back button - secondary tone */
.bm-btn-back {
    background: #6c757d !important;
}
.bm-btn-back:hover {
    background: #5a6268 !important;
}

.bm-hidden {
    display: none !important;
}

/* =================================================================
   TOAST OVERLAY
   ================================================================= */

.bm-toast {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.7);
}
.bm-toast-body {
    background: #fff;
    margin: 15% auto;
    padding: 50px 50px;
    max-width: 500px;
    border-radius: 20px;
    position: relative;
    text-align: center;
}
.bm-toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 20px;
    top: 20px;
    line-height: 1;
    font-size: 24px;
    height: 36px;
    width: 36px;
    border: 1px solid lightgray;
    border-radius: 50%;
    cursor: pointer;
}
.bm-toast-close.hidden {
    display: none !important;
}
.bm-toast-icon {
    font-size: 50px;
    margin-bottom: 30px;
}
.bm-toast-icon .fa-exclamation-triangle { color: orange; }
.bm-toast-icon .fa-cog { color: #1590C5; }
.bm-toast-icon .fa-check-square { color: #00af00; }
.bm-toast-title {
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.2em;
}
.bm-toast-description {
    font-size: 18px;
}
@media (max-width: 767px) {
    .bm-toast-body {
        padding: 50px 20px;
        max-width: 95%;
    }
    .bm-toast-title { font-size: 22px; }
    .bm-toast-description { font-size: 16px; }
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 480px) {
    .bm-business-submisssion-form {
        padding: 10px;
    }
    .bm-inline-fields > div {
        width: 100%;
    }
}
