:root {
    --step-circle-size: 48px;
    --step-gap: 0;
    --step-line-thickness: 2px;
    --step-line-color: #e6e6e6;
    --step-active-color: #d51801;
}

body {
    background-color: #f3f4f6;
}

/* Container */
.step-indicators{
  display:flex;
  justify-content:center;
  gap:var(--step-gap);
  align-items: stretch; /* keep steps top-aligned so absolute circle positions are consistent */
}

/* Each step becomes an equal column so labels wrap evenly */
.step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0; /* equal-width columns */
    min-width: 120px; /* prevent collapsing on very small screens */
    max-width: 250px;
    padding-top: calc(var(--step-circle-size) + 8px); /* reserve space for absolute circle */
    min-height: calc(var(--step-circle-size) + 60px); /* ensures there is room for 2 lines of label */
    box-sizing: border-box;
}

/* Circle (absolute so it doesn't move when text wraps) */
.step-circle{
  position:absolute;
  top:0;
  left:50%;
  transform:translateX(-50%);
  width:var(--step-circle-size);
  height:var(--step-circle-size);
  border-radius:50%;
  background:#fff;
  border:2px solid var(--step-line-color);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:600;
  z-index:2;
}

/* Horizontal connector lines drawn at circle center */
.step::before,
.step::after{
  content:"";
  position:absolute;
  height:var(--step-line-thickness);
  background:var(--step-line-color);
  top: calc(var(--step-circle-size) / 2); /* line goes through circle center */
  z-index:1;
}

.step::before{ left:0; right:50%; }   /* left half */
.step::after { left:50%; right:0; }   /* right half */

/* Remove outboard lines on ends */
.step:first-child::before{ display:none; }
.step:last-child::after{ display:none; }

/* Active visuals for circle + connectors */
/* circle */
.step.active .step-circle{
  border-color:var(--step-active-color);
  background:var(--step-active-color);
  color:#fff;
}

/* color line to the right of an active step */
.step.active::after{
  background:var(--step-active-color);
}

/* color the left connector of a step whose previous sibling is active */
.step.active + .step::before{
  background:var(--step-active-color);
}

/* Text: center and allow normal wrapping (avoid white-space:break-spaces) */
.step-text {
    margin: 0;
    margin-top: inherit;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    padding: 0 6px; /* small horizontal padding so long words wrap nicely */
}


/* Cards */
.plan-card,
.mbe-main .card {
    border-radius: 12px;
    border: 1.99px solid #7e7e7e;
    cursor: pointer;
}

.plan-card.selected,
.mbe-main .card.selected {
    border-color: #d51801;
    box-shadow: 0 0 5.5px rgba(213, 26, 1, 0.45);
}

.plan-card.selected .icon-container,
.mbe-main .card.selected .icon-container {
    background-color: #d51801;
    border: 1px solid #d51801;
}

.plan-card.selected .icon-container i,
.mbe-main .card.selected .icon-container i {
    color: #fff;
}

.plan-card.selected .selection-tick i,
.mbe-main .card.selected .selection-tick i {
    display: block !important;
    color: #d51801;
}

/* Upgrade Cards */
.upgrade-card {
    border: 1px solid #7e7e7e !important;
    border-radius: 10px !important;
    padding: 14px;
    background: #fff;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.upgrade-card.selected {
    border: 2px solid #d51801;
    background: #fff6f7;
}

.upgrade-card .form-check-input {
    margin-right: 10px;
    pointer-events: none;
}

.upgrade-card label {
    cursor: pointer;
}

.upgrade-card-label {
    display: flex !important;
    margin-bottom: .25rem !important;
    align-items: center !important;
}

/* Allow clicking anywhere in upgrade-card to toggle checkbox */
.upgrade-card {
    display: flex;
}

.icon-red {
    color: #d51801;
}

/* Upgrade Pricing */
.price-container {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.price-value {
    font-size: 18px;
}

.price-period {
    font-size: 13px;
}

/* Features (Small) */
.features-list-small li {
    font-size: 13px;
    margin-bottom: 6px;
}

/* Order Summary */
.order-summary {
    background: #e5e3df !important;
    border: 1.99px solid #d7d5d1;
    border-radius: 12px;
}

.order-summary .summary-item {
    font-size: 14px;
}

.order-summary .due-today {
    font-size: 16px;
}

/* Order Summary Utility Classes */
.order-summary .space-y-4 > * + * {
    margin-top: 1rem;
}

.order-summary .space-y-2 > * + * {
    margin-top: 0.5rem;
}

.order-summary .space-y-1 > * + * {
    margin-top: 0.25rem;
}

.order-summary .info-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.order-summary .info-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.order-summary .info-content {
    flex: 1;
}

.order-summary .discount-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.order-summary .customer-preview {
    margin-top: 1rem;
}

/* Desktop: sticky (follows scroll) */
@media (min-width: 992px) {
    .order-summary {
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
}

/* Mobile: fixed at bottom */
@media (max-width: 991.98px) {
    .order-summary {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 12px 12px 0 0;
        max-height: 50vh;
        overflow-y: auto;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }
    
    /* Add padding to main content so it doesn't hide under fixed summary */
    main {
        padding-bottom: 50vh !important;
    }
}

/* Green “Switch to annual” banner */
#switch-annual-box {
    background: #00c951 !important;
    color: white;
    border-radius: 6px;
}

/* Toggle switch */
.form-switch .form-check-input:checked {
    background-color: #d51801;
    border-color: #d51801;
}

/* Badges */
.popular-badge {
    background: #d51801 !important;
}

.optional-badge {
    background: #6c757d !important;
}

.prestigious-badge {
    background: linear-gradient(to right, #fc9800, #e17100) !important;
}

.icon-prestigious {
    color: #e17100 !important;
}

/* Select */
select.form-select {
    margin-top: 4px;
}

/* Annual hint */
.annual-only-info.d-none, .monthly-only-info.d-none {
    display: none;
}

.annual-only-info, .monthly-only-info {
    background-color: #e8f7ef;
    color: #1f7a4d;
    border: 1px solid #a2fccf;
    font-weight: 500;
    cursor: pointer;
}

/* Billing cycle toggle */
.billing-cycle .btn {
    background: #fff;
    color: #000;
    border-radius: 10px;
    border: 1px solid #d7d5d1;
}

.billing-cycle .btn.active {
    background: #d51801;
    color: #fff;
}

.billing-cycle .btn .save-badge {
    background: #e5e3df;
    color: black;
}

/* Find store button */
.find-store-btn {
    padding-top: 10px;
    padding-bottom: 10px;
}

.find-store-btn:hover {
    background-color: #f2f2f2 !important;
    color: #000 !important;
    border-color: #ced4da;
}

.address_field {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.text-red {
    color: #d51801;
}

.bg_secondary {
    background: #e5e3df !important;
}

.bg_primary {
    background-color: #d51801 !important;
}


/* Minor responsive polish */
@media (max-width: 767.98px) {
    .address-selection .d-flex {
        flex-direction: column;
        gap: 12px;
    }

    .address-selection .find-store-btn {
        width: 100% !important;
    }
}

.saved-amount {
    border-radius: 6px;
}

.switch-card-annual:hover {
    background: #d2f8df !important;
}

.saved-amount.alert-primary {
    background: #e9f2ff !important;
    border-color: #bcd4ff !important;
    color: #003e9e !important;
}

/* Upgrade cards behaviour */
/*.upgrade-card {
    border: 1px solid #eee;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    background: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}*/

.upgrade-card.upgrade-active {
    border-color: #d51801;
    box-shadow: 0 0 0 1px rgba(213, 24, 1, 0.15);
    background: #fff7f6;
}

.upgrade-card .card-details-collapsible {
    display: none;
}

.upgrade-card.upgrade-active .card-details-collapsible {
    display: block;
}

.w-90 {
    width: 90%;
}

.price-value {
    color: #d51801;
    font-size: 25px;
    margin-bottom: 0;
}

.price-container {
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 0;
}

.upgrade-card .form-check-input {
    transform: scale(1.5);
    margin-top: 5px;
    margin-bottom: 5px;
}

.icon-container {
    height: 50px;
    width: 50px;
    background-color: #f3f4f6;
    border-radius: 15px;
}

.icon-container i {
    color: #d51801;
}

.list-no-style {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-tab.active {
    color: #d51801;
    border-bottom: 3px solid #d51801 !important;
}

@media (min-width: 768px) {
    .col-md-9 {
        flex: 0 0 auto;
        width: 75% !important;
    }
}

.form-control:focus {
    box-shadow: none !important;
    outline: none !important;
}

.form-check-input:checked {
    background-color: #d51801;
    border-color: #d51801;
}

.form-check-inputB {
    width: 1.2em;
    height: 1.2em;
}

/* POPUP SIZE + COLORS */
.store-popup {
    width: 85%;
    max-width: 1200px;
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    max-height: 85vh;
    overflow-y: auto;
}

/* Overlay */
.store-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
}

/* Store list styling */
.store-list {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 10px;
}

.store-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.store-item:hover {
    border-color: #cc0000;
    cursor: pointer;
}

.store-distance {
    background: #f3f3f3;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
}

/* Map placeholder area */
.map-box {
    height: 100%;
    background: linear-gradient(135deg, #f8f8f8, #eef8ff);
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

/* Buttons */
.btn-select-store {
    width: 100%;
    margin-top: 10px;
    background: #000;
    color: white;
    border-radius: 6px;
}

.store-item.selected {
    border: 2px solid #d00 !important;
    background: #fff7f7;
}

.store-item {
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    transition: 0.2s ease;
}

.store-item:hover {
    border-color: #d00;
}

/* Validation styling */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Payment Page Styles */

.payment-card {
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-card:hover {
    border-color: #999;
}

.payment-card.selected {
    border-color: #d51801;
    background: white;
}

.payment-card.selected .payment_icon {
    background-color: #d51801;
    color: white;
}

.recommended-tag {
    padding: 3px 10px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
}

.warning-box {
    background: #fff8e5;
    border: 1px solid #f4d98c;
    padding: 16px;
    border-radius: 8px;
}

.payment-box {
    background: #d1e7dd;
    border: 1px solid #a3cfbb;
    padding: 16px;
    border-radius: 8px;
}

.blue-box {
    background: #eff6ff;
    border: 1px solid #193cb8;
    padding: 16px;
    color: #1c398e;
    border-radius: 8px;
}

.payment_icon {
    background: gainsboro;
    height: 45px;
    width: 45px;
    color: rgb(53, 53, 53);
    border-radius: 10px;
    flex-shrink: 0;
}

.bg-light {
    background-color: #dee2e6 !important;
}
/* Disabled input styling for VAT and Company Reg fields */
input:disabled.form-control {
    background-color: #e9ecef !important;
    opacity: 0.65;
    cursor: not-allowed;
    color: #6c757d;
}

input:disabled.form-control::placeholder {
    color: #6c757d;
    opacity: 0.6;
}

/* Enhanced greyed out state for when plan not selected */
#enhanceSubtext,
#selectStoreNotice {
    color: #999;
    font-style: italic;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: center;
}

#enhanceHeading,
#selectStoreNotice {
    color: #666;
}

#planSelectionSection h2 {
    color: #666;
}

#planSelectionSection h2.heading-active {
    color: #212529;
}

#enhanceContent.d-none {
    pointer-events: none;
    opacity: 0.5;
}

#businessStructure {
    margin-top: 0;
}

/* Animated reveal for checkout sections */
.section-hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease-out;
    pointer-events: none;
}

.section-visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease-out;
    pointer-events: auto;
}

/* Loading spinner */
.spinner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    gap: 1rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid rgba(0, 0, 0, 0.1);
    border-right-color: #c41f3f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-text {
    color: #6c757d;
    font-size: 0.95rem;
}


/* Store search section */
.store-search-section {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.store-search-section .input-group {
    max-width: 100%;
}

#storeSearchInput {
    border-radius: 6px 0 0 6px;
}

#storeSearchButton {
    border-radius: 0 6px 6px 0;
    padding: 0 20px;
}

#searchStatus {
    min-height: 20px;
}

/* Map container */
.map-box {
    min-height: 400px;
    height: 65vh;
}

#map {
    min-height: 400px;
}

/* Info window styling (injected via JavaScript) */
.store-info-window {
    padding: 10px;
}

.store-info-window h6 {
    margin-bottom: 8px;
    color: #d51801;
}

.store-info-window p {
    margin-bottom: 5px;
    font-size: 14px;
}

/* Loading spinner */
#storesLoading {
    padding: 40px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .store-popup {
        width: 95%;
        max-height: 90vh;
    }

    .map-box {
        height: 300px;
        min-height: 300px;
        margin-top: 20px;
    }

    .store-search-section .input-group {
        flex-direction: column;
    }

    #storeSearchInput {
        border-radius: 6px 6px 0 0;
        margin-bottom: 8px;
        width: 100%;
    }

    #storeSearchButton {
        border-radius: 0 0 6px 6px;
        width: 100%;
    }
}

/* -- Small layout & accessibility fixes for .upgrade-card (prevent overflow on mobile) -- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Ensure card content can shrink/wrap */
.upgrade-card {
  display: flex;             /* already used, but ensure correct baseline */
  gap: 0.5rem;
  align-items: flex-start;
  padding: 14px;
  overflow: hidden;         /* stop children from visually overflowing the card */
  word-wrap: break-word;
}

/* Allow the main content column to shrink so long text wraps instead of pushing out */
.upgrade-card > .w-100 {
  min-width: 0;             /* CRUCIAL for flex children to be able to shrink on narrow screens */
  flex: 1 1 auto;
}

/* Price container should not shrink and should align right */
.upgrade-card .price-container {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: 8px;
  white-space: nowrap;
}

/* Make sure labels and descriptions wrap correctly */
.upgrade-card .form-check-label,
.upgrade-card .card-description,
.upgrade-card .card-details {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Checkbox sizing and appearance */
/* Keep a slightly larger checkbox on desktop, but ensure square aspect and remove transform on mobile */
.form-check-inputB {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  margin-top: 0.25rem;
  transform: none;              /* remove arbitrary scaling that can distort aspect ratio */
  appearance: auto;
  -webkit-appearance: checkbox;
}

/* If you want a slightly larger checkbox on larger screens */
@media (min-width: 768px) {
  .form-check-inputB {
    width: 1.35rem;
    height: 1.35rem;
  }
}

.exclude-vat-checkbox {
    margin-bottom: 1.5rem !important;
    justify-content: flex-end !important;
    display: flex !important;
}

/* Mobile: stack if necessary and give breathing room */
@media (max-width: 767.98px) {
    .upgrade-card {
    gap: 0.6rem;
    align-items: flex-start;
    }

    /* Ensure price doesn't push content; if very narrow, price will drop under the title */
    .upgrade-card .price-container {
    margin-left: 0.5rem;
    text-align: right;
    }

    /* Slight padding inside card-details so list items never escape visually */
    .upgrade-card .card-details {
    padding-right: 2px;
    }

    .upgrade-card-label {
        flex-direction: column;
        align-items: baseline;
        padding-bottom: 15px;
    }

    .chooseAddress{
        padding:0 !important;
    }

    
}

/* Defensive: ensure long lists inside card don't overflow horizontally */
.upgrade-card .features-list-small {
  margin: 0;
  padding-left: 1rem;
  overflow-wrap: anywhere;
}

@media (max-width: 430px) {
    .exclude-vat-checkbox {
        justify-content: center !important;
    }
}

/*Conditionally show info based on if store centrally managed.*/
.cm-store .mitek-info {
    display: block;
}

.non-cm .mitek-info {
    display: none;
}


/* Larger checkboxes for payment page */
#idConsent,
#termsAccept,
#marketingOptIn {
    width: 1.5em;
    height: 1.5em;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    accent-color: #d51801;
}


