/* ============================================================
   Meal Plan Builder — styles
   Matches the existing order-form design tokens:
   primary blue #193DCD, ink #141414, soft grays #F7F7F7/#F0F0F0,
   border #14141447/#0000003B, Roboto font, pill/rounded shapes.
   ============================================================ */

.mpb { position: relative; }
.mpb-sec .form-box h3 { margin-bottom: 16px; margin-top: 30px; color: #fff; }
.mpb-sec .form-box h3:first-of-type { margin-top: 0; }

/* ---- step tabs (calculator header) ---- */
.mpb-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    background: #F0F0F0;
    border-radius: 50px;
    padding: 8px;
    margin-bottom: 30px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.mpb-tab {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    color: #14141480;
    padding: 8px 16px;
    border-radius: 50px;
}
.mpb-tab.active {
    background: #fff;
    color: #193DCD;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ---- selects (reuse .form-control look) ---- */
.mpb-select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 40px !important;
}

/* ---- target result card ---- */
.mpb-target-card {
    margin-top: 30px;
    background: #193DCD;
    border-radius: 20px;
    padding: 26px;
    color: #fff;
}
.mpb-target-card h3 { color: #fff; font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.mpb-goal-pill {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 22px;
}
.mpb-target-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.mpb-target-box {
    background: #fff;
    border-radius: 14px;
    padding: 18px 10px;
    text-align: center;
}
.mpb-target-box strong { display: block; font-size: 26px; font-weight: 700; line-height: 1.2; color: #193DCD; }
.mpb-target-box span { display: block; margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #14141499; }
.mpb-target-card .btn-primary { background: #141414; }

/* ---- card-select (days/week, variety, duration) ---- */
.mpb-card-select { display: flex; flex-direction: column; gap: 16px; }
.mpb-card {
    position: relative;
    border: 1px solid #14141426;
    border-radius: 16px;
    padding: 18px 22px;
    cursor: pointer;
    transition: 0.2s;
}
.mpb-card:hover { border-color: #193DCD80; }
.mpb-card.active { border-color: #193DCD; background: #193DCD0D; }
.mpb-card strong { display: block; font-size: 18px; color: #141414; margin-bottom: 4px; }
.mpb-card p { margin: 0; color: #14141499; font-size: 14px; line-height: 1.5; }
.mpb-card-badge {
    position: absolute;
    top: -12px;
    right: 18px;
    background: #193DCD;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
}
.mpb-card-badge.mpb-save { background: #1ea672; }

/* ---- summary list (step 5) ---- */
.mpb-summary-list { list-style: none; padding: 0; margin: 0 0 10px; }
.mpb-summary-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #14141414;
    font-size: 15px;
    color: #14141499;
}
.mpb-summary-list li strong { color: #141414; font-weight: 600; }
.mpb-summary-list li.mpb-summary-total { border-bottom: none; padding-top: 20px; }
.mpb-summary-list li.mpb-summary-total strong { color: #193DCD; font-size: 22px; }

/* ============================================================
   STEP 4 — meal selection
   ============================================================ */
.mpb-meals-sec { padding-bottom: 140px; }

.mpb-meal-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 30px;
    -webkit-overflow-scrolling: touch;
}
/* Specificity/!important is intentionally boosted here: the site's global
   button styling (button:not(:disabled) rules in style.css, plus any
   Elementor/Hello theme button defaults outside this stylesheet) otherwise
   overrides the inactive-tab look and makes every tab appear "active". */
.mpb-meal-tabs .mpb-meal-tab.mpb-meal-tab {
    flex-shrink: 0;
    border: 1px solid #14141426 !important;
    background: #fff !important;
    border-radius: 50px;
    padding: 10px 22px !important;
    font-weight: 600;
    color: #141414 !important;
    opacity: 0.55;
    transition: 0.2s;
}
.mpb-meal-tabs .mpb-meal-tab.mpb-meal-tab.active {
    background: #193DCD !important;
    border-color: #193DCD !important;
    color: #fff !important;
    opacity: 1;
    box-shadow: 0 4px 14px rgba(25,61,205,0.35);
}

.mpb-meal-card {
    background: #fff;
    border: 1px solid #0000003B;
    border-radius: 19px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.mpb-meal-photo {
    height: 180px;
    background-color: #F0F0F0;
    background-size: cover;
    background-position: center;
    position: relative;
}
.mpb-meal-tag {
    position: absolute;
    left: 14px;
    top: 14px;
    background: #141414;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
}
.mpb-meal-body { padding: 18px 20px; display: flex; flex-direction: column; flex-grow: 1; }
.mpb-meal-body h4 { font-size: 18px; font-weight: 700; color: #141414; margin-bottom: 6px; }
.mpb-meal-body p { font-size: 14px; color: #14141499; line-height: 1.5; margin-bottom: 14px; }
.mpb-macro-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #F7F7F7;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    color: #141414;
    margin-bottom: 16px;
}
.mpb-meal-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed #14141426;
    padding-top: 14px;
}
.mpb-price { font-size: 20px; font-weight: 700; color: #193DCD; }
.mpb-stepper {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #14141426;
    border-radius: 12px;
    padding: 4px 12px;
}
/* Specificity/!important boosted: the site's global button rule
   (button:not(:disabled){padding:...!important;color:#fff}) otherwise wins,
   making the +/- glyph invisible (white on light gray) and changing the
   button's box size only when it stops matching :not(:disabled). */
.mpb-meal-card .mpb-meal-footer .mpb-stepper .mpb-stepper-btn {
    box-sizing: border-box !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    margin: 0;
    border: none;
    border-radius: 8px;
    background: #F0F0F0 !important;
    color: #141414 !important;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mpb-meal-card .mpb-meal-footer .mpb-stepper .mpb-stepper-btn:disabled { opacity: 0.4 !important; }
.mpb-stepper span { min-width: 18px; text-align: center; font-weight: 600; color: #141414; }

/* ---- sticky bottom bar + expandable tracker ---- */
.mpb-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.12);
    border-radius: 24px 24px 0 0;
    max-height: 85vh;
    overflow-y: auto;
}
.mpb-sticky-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
}
.mpb-sticky-count { font-weight: 600; color: #141414; font-size: 14px; white-space: nowrap; }
.mpb-sticky-cost { font-size: 14px; color: #14141499; white-space: nowrap; }
.mpb-sticky-cost strong { color: #193DCD; font-size: 18px; margin-left: 4px; }
.mpb-sticky-bar .mpb-sticky-summary .mpb-expand-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    background: #193DCD !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px !important;
    border: none;
    border-radius: 50px;
    white-space: nowrap;
    line-height: 1;
}
.mpb-sticky-bar .mpb-sticky-summary .mpb-expand-btn .mpb-expand-icon {
    font-size: 12px;
    line-height: 1;
    transform: translateY(1px);
}

.mpb-tracker-panel { padding: 0 22px 26px; border-top: 1px solid #14141414; }
.mpb-tracker-head { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; margin-bottom: 16px; }
.mpb-tracker-head h3 { font-size: 18px; color: #193DCD; margin: 0; }
.mpb-live-pill {
    background: #E6F7EF;
    color: #1ea672;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
}
.mpb-tracker-row { margin-bottom: 14px; }
.mpb-tracker-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #141414;
    margin-bottom: 6px;
}
.mpb-progress { height: 8px; background: #F0F0F0; border-radius: 50px; overflow: hidden; }
.mpb-progress-fill { height: 100%; background: #1ea672; border-radius: 50px; transition: width 0.3s; }

.mpb-tracker-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}
.mpb-tracker-stats div {
    background: #F7F7F7;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}
.mpb-tracker-stats span { display: block; font-size: 22px; font-weight: 700; color: #193DCD; margin-bottom: 4px; }
.mpb-tracker-stats small { display: block; font-size: 11px; color: #14141499; text-transform: uppercase; letter-spacing: 0.04em; }

.mpb-tracker-cost {
    background: #F7F7F7;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    margin-bottom: 18px;
}
.mpb-tracker-cost > span { display: block; font-size: 12px; color: #14141499; text-transform: uppercase; letter-spacing: 0.04em; }
.mpb-tracker-cost strong { font-size: 30px; color: #141414; }
.mpb-tracker-cost p { margin: 4px 0 0; font-size: 14px; color: #14141499; }
.mpb-discount-note { color: #1ea672 !important; font-weight: 600; }

/* ============================================================
   Responsive — desktop refinements
   ============================================================ */
@media (min-width: 992px) {
    .mpb-target-grid { grid-template-columns: repeat(4, 1fr); }
    .mpb-card-select { flex-direction: row; }
    .mpb-card { flex: 1; }
    .mpb-sticky-bar { border-radius: 24px; left: 50%; transform: translateX(-50%); bottom: 24px; width: min(700px, 92vw); }
    .mpb-tracker-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
    .mpb-tabs { padding: 6px; }
    .mpb-tab { font-size: 12px; padding: 8px 12px; }
    .mpb-target-box strong { font-size: 20px; }
}
