/*
 * 1.1.246 — Kadence adaptive palette production default + contrast polish.
 * Loaded by default; disable with bmb_disable_kadence_adaptive_palette.
 *
 * Priority order:
 * 1) Kadence globals: --global-palette-highlight / --global-palette1..9
 * 2) WordPress presets: --wp--preset--color--primary/base/contrast/etc.
 * 3) Current Chipotle fallback colors.
 */
.bmb-guided-shell,
.bmb-calculator,
.bmb-ingredient-table-container,
.bmb-presets-container,
.bmb-disclaimer {
    --bmb-adaptive-primary: var(--global-palette-highlight, var(--global-palette1, var(--wp--preset--color--primary, #ff6a00)));
    --bmb-adaptive-primary-hover: var(--global-palette-highlight-alt, var(--global-palette2, var(--wp--preset--color--secondary, #ff7a00)));
    --bmb-adaptive-text: var(--global-palette3, var(--wp--preset--color--contrast, #241409));
    --bmb-adaptive-text-muted: var(--global-palette4, #6d5037);
    --bmb-adaptive-text-soft: var(--global-palette5, #7d6b5a);
    --bmb-adaptive-border: var(--global-palette6, #f1d5ad);
    --bmb-adaptive-border-soft: var(--global-palette7, #f1dfc5);
    --bmb-adaptive-surface-soft: var(--global-palette8, var(--wp--preset--color--tertiary, #fff8ef));
    --bmb-adaptive-surface: var(--global-palette9, var(--wp--preset--color--base, #ffffff));
    --bmb-adaptive-success: #2f8b45;
    --bmb-adaptive-warning: #b45309;
    --bmb-adaptive-danger: #991b1b;
    --bmb-adaptive-overlay: rgba(15, 23, 42, 0.42);

    --bmb-ui-orange: var(--bmb-adaptive-primary);
    --bmb-ui-orange-hover: var(--bmb-adaptive-primary-hover);
    --bmb-ui-orange-pressed: color-mix(in srgb, var(--bmb-adaptive-primary) 84%, #000 16%);
    --bmb-ui-cream: var(--bmb-adaptive-surface-soft);
    --bmb-ui-cream-strong: color-mix(in srgb, var(--bmb-adaptive-surface-soft) 72%, var(--bmb-adaptive-primary) 8%, var(--bmb-adaptive-surface) 20%);
    --bmb-ui-brown: var(--bmb-adaptive-text);
    --bmb-ui-border: var(--bmb-adaptive-border);
    --bmb-ui-border-active: var(--bmb-adaptive-primary);
    --bmb-ui-focus-ring: color-mix(in srgb, var(--bmb-adaptive-primary) 42%, transparent);
    --bmb-ui-hover-shadow: 0 10px 24px color-mix(in srgb, var(--bmb-adaptive-text) 12%, transparent);
    --bmb-ui-press-shadow: 0 4px 10px color-mix(in srgb, var(--bmb-adaptive-text) 12%, transparent);

    color: var(--bmb-adaptive-text);
}

.bmb-guided-shell .bmb-calculator,
.bmb-guided-shell .bmb-experience-step,
.bmb-guided-shell .bmb-setup-summary-card,
.bmb-guided-shell .bmb-builder-handoff-card,
.bmb-guided-shell .bmb-goal-preview-card,
.bmb-guided-shell .bmb-meal-type-preview-card,
.bmb-guided-shell .bmb-source-transparency-note,
.bmb-guided-shell .bmb-mobile-summary,
.bmb-guided-shell .bmb-mobile-bowl-drawer,
.bmb-guided-shell .bmb-meal-dialog-panel,
.bmb-guided-shell .bmb-receipt-preview,
.bmb-guided-shell .bmb-saved-builds-panel,
.bmb-guided-shell .bmb-swap-impact-card,
.bmb-guided-shell .bmb-suggestions-panel,
.bmb-guided-shell .bmb-changes-from-starter-panel,
.bmb-guided-shell .bmb-contribution-breakdown,
.bmb-ingredient-table-container,
.bmb-presets-container,
.bmb-disclaimer {
    background: var(--bmb-adaptive-surface) !important;
    border-color: var(--bmb-adaptive-border) !important;
    color: var(--bmb-adaptive-text) !important;
}

.bmb-guided-shell .bmb-experience-header,
.bmb-guided-shell .bmb-goal-preview-card,
.bmb-guided-shell .bmb-meal-type-preview-card,
.bmb-guided-shell .bmb-source-history-details[open],
.bmb-guided-shell .bmb-nutrition-card,
.bmb-guided-shell .bmb-nutrition-cell,
.bmb-guided-shell .bmb-dialog-section,
.bmb-guided-shell .bmb-ingredient-breakdown-row,
.bmb-guided-shell .bmb-receipt-card,
.bmb-guided-shell .bmb-saved-build-card,
.bmb-guided-shell .bmb-swap-impact-option,
.bmb-guided-shell .bmb-suggestion-card {
    background: var(--bmb-adaptive-surface-soft) !important;
    border-color: var(--bmb-adaptive-border-soft) !important;
    color: var(--bmb-adaptive-text) !important;
}

.bmb-guided-shell h2,
.bmb-guided-shell h3,
.bmb-guided-shell h4,
.bmb-guided-shell .bmb-step-head strong,
.bmb-guided-shell .bmb-goal-preview-card strong,
.bmb-guided-shell .bmb-meal-type-copy strong,
.bmb-guided-shell .bmb-starter-row-title,
.bmb-guided-shell .bmb-mobile-summary-title,
.bmb-guided-shell .bmb-dialog-title,
.bmb-guided-shell .bmb-receipt-title {
    color: var(--bmb-adaptive-text) !important;
}

.bmb-guided-shell p,
.bmb-guided-shell small,
.bmb-guided-shell .bmb-muted,
.bmb-guided-shell .bmb-step-head p,
.bmb-guided-shell .bmb-meal-type-copy small,
.bmb-guided-shell .bmb-starter-row-description,
.bmb-guided-shell .bmb-receipt-meta,
.bmb-guided-shell .bmb-source-history-copy,
.bmb-guided-shell .bmb-nutrition-label {
    color: var(--bmb-adaptive-text-muted) !important;
}

.bmb-guided-shell .bmb-step-number,
.bmb-guided-shell .bmb-flow-chip strong,
.bmb-guided-shell .bmb-category-tab-count,
.bmb-guided-shell .bmb-bowl-toggle,
.bmb-guided-shell .bmb-primary-button,
.bmb-guided-shell .bmb-apply-suggestion,
.bmb-guided-shell .bmb-apply-swap,
.bmb-guided-shell .bmb-receipt-print,
.bmb-guided-shell .bmb-receipt-export,
.bmb-guided-shell .bmb-save-build-button,
.bmb-guided-shell button[data-bmb-save-build],
.bmb-guided-shell button[data-bmb-apply-suggestion],
.bmb-guided-shell button[data-bmb-apply-swap] {
    background: var(--bmb-adaptive-primary) !important;
    border-color: var(--bmb-adaptive-primary) !important;
    color: var(--global-palette9, var(--wp--preset--color--base, #ffffff)) !important;
}

.bmb-guided-shell .bmb-bowl-toggle:hover,
.bmb-guided-shell .bmb-primary-button:hover,
.bmb-guided-shell .bmb-apply-suggestion:hover,
.bmb-guided-shell .bmb-apply-swap:hover,
.bmb-guided-shell .bmb-receipt-print:hover,
.bmb-guided-shell .bmb-receipt-export:hover,
.bmb-guided-shell .bmb-save-build-button:hover,
.bmb-guided-shell button[data-bmb-save-build]:hover,
.bmb-guided-shell button[data-bmb-apply-suggestion]:hover,
.bmb-guided-shell button[data-bmb-apply-swap]:hover {
    background: var(--bmb-adaptive-primary-hover) !important;
    border-color: var(--bmb-adaptive-primary-hover) !important;
}

.bmb-guided-shell .bmb-meal-type-card,
.bmb-guided-shell .bmb-goal-chip,
.bmb-guided-shell .bmb-starter-row,
.bmb-guided-shell .bmb-ingredient-card,
.bmb-guided-shell .bmb-chip,
.bmb-guided-shell .bmb-category-tab,
.bmb-guided-shell .bmb-tabs-nav,
.bmb-guided-shell .bmb-setup-summary-pill,
.bmb-guided-shell .bmb-goal-match-pill,
.bmb-guided-shell .bmb-portion-toggle,
.bmb-guided-shell .bmb-secondary-button,
.bmb-guided-shell .bmb-dialog-close,
.bmb-guided-shell .bmb-reset-button {
    border-color: var(--bmb-adaptive-border) !important;
    color: var(--bmb-adaptive-text) !important;
}

.bmb-guided-shell .bmb-meal-type-card,
.bmb-guided-shell .bmb-goal-chip,
.bmb-guided-shell .bmb-starter-row,
.bmb-guided-shell .bmb-ingredient-card,
.bmb-guided-shell .bmb-tabs-nav,
.bmb-guided-shell .bmb-setup-summary-pill,
.bmb-guided-shell .bmb-goal-match-pill,
.bmb-guided-shell .bmb-secondary-button,
.bmb-guided-shell .bmb-dialog-close,
.bmb-guided-shell .bmb-reset-button {
    background: var(--bmb-adaptive-surface) !important;
}

.bmb-guided-shell .bmb-meal-type-active,
.bmb-guided-shell .bmb-goal-chip-active,
.bmb-guided-shell .bmb-starter-row.is-selected,
.bmb-guided-shell .bmb-starter-row-selected,
.bmb-guided-shell .bmb-ingredient-card.bmb-selected,
.bmb-guided-shell .bmb-ingredient-card.is-selected,
.bmb-guided-shell .bmb-category-tab.bmb-tab-active,
.bmb-guided-shell .bmb-chip.bmb-chip-active,
.bmb-guided-shell .bmb-portion-toggle.is-active {
    background: color-mix(in srgb, var(--bmb-adaptive-primary) 10%, var(--bmb-adaptive-surface) 90%) !important;
    border-color: var(--bmb-adaptive-primary) !important;
    color: var(--bmb-adaptive-primary) !important;
}

.bmb-guided-shell .bmb-category-tab:hover,
.bmb-guided-shell .bmb-tabs-nav:hover,
.bmb-guided-shell .bmb-meal-type-card:hover,
.bmb-guided-shell .bmb-goal-chip:hover,
.bmb-guided-shell .bmb-starter-row:hover,
.bmb-guided-shell .bmb-ingredient-card:hover,
.bmb-guided-shell .bmb-chip:hover,
.bmb-guided-shell .bmb-secondary-button:hover,
.bmb-guided-shell .bmb-dialog-close:hover,
.bmb-guided-shell .bmb-reset-button:hover {
    background: color-mix(in srgb, var(--bmb-adaptive-primary) 7%, var(--bmb-adaptive-surface) 93%) !important;
    border-color: var(--bmb-adaptive-primary) !important;
    color: var(--bmb-adaptive-primary) !important;
}

.bmb-guided-shell a,
.bmb-guided-shell .bmb-category-tab.bmb-tab-active,
.bmb-guided-shell .bmb-goal-preview-icon,
.bmb-guided-shell .bmb-source-history-summary strong,
.bmb-guided-shell .bmb-nutrition-value,
.bmb-guided-shell .bmb-positive-delta,
.bmb-guided-shell .bmb-suggestion-kicker,
.bmb-guided-shell .bmb-swap-impact-delta {
    color: var(--bmb-adaptive-primary) !important;
}

.bmb-guided-shell .bmb-meal-dialog-backdrop,
.bmb-guided-shell .bmb-mobile-drawer-backdrop {
    background: var(--bmb-adaptive-overlay) !important;
}

.bmb-guided-shell :focus-visible {
    outline-color: var(--bmb-adaptive-primary) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bmb-adaptive-primary) 32%, transparent) !important;
}

.bmb-guided-shell .bmb-toast,
.bmb-guided-shell .bmb-notice {
    background: var(--bmb-adaptive-surface) !important;
    border-color: var(--bmb-adaptive-border) !important;
    color: var(--bmb-adaptive-text) !important;
}

.bmb-guided-shell .bmb-status-good,
.bmb-guided-shell .bmb-success,
.bmb-guided-shell [data-bmb-status="good"] {
    color: var(--bmb-adaptive-success) !important;
}

@supports not (color: color-mix(in srgb, red 10%, white 90%)) {
    .bmb-guided-shell,
    .bmb-calculator,
    .bmb-ingredient-table-container,
    .bmb-presets-container,
    .bmb-disclaimer {
        --bmb-ui-orange-pressed: var(--bmb-adaptive-primary-hover);
        --bmb-ui-cream-strong: var(--bmb-adaptive-surface-soft);
        --bmb-ui-focus-ring: rgba(255, 122, 0, 0.42);
        --bmb-ui-hover-shadow: 0 10px 24px rgba(74, 45, 18, 0.12);
        --bmb-ui-press-shadow: 0 4px 10px rgba(74, 45, 18, 0.12);
    }

    .bmb-guided-shell .bmb-meal-type-active,
    .bmb-guided-shell .bmb-goal-chip-active,
    .bmb-guided-shell .bmb-starter-row.is-selected,
    .bmb-guided-shell .bmb-starter-row-selected,
    .bmb-guided-shell .bmb-ingredient-card.bmb-selected,
    .bmb-guided-shell .bmb-ingredient-card.is-selected,
    .bmb-guided-shell .bmb-category-tab.bmb-tab-active,
    .bmb-guided-shell .bmb-chip.bmb-chip-active,
    .bmb-guided-shell .bmb-portion-toggle.is-active,
    .bmb-guided-shell .bmb-category-tab:hover,
    .bmb-guided-shell .bmb-tabs-nav:hover,
    .bmb-guided-shell .bmb-meal-type-card:hover,
    .bmb-guided-shell .bmb-goal-chip:hover,
    .bmb-guided-shell .bmb-starter-row:hover,
    .bmb-guided-shell .bmb-ingredient-card:hover,
    .bmb-guided-shell .bmb-chip:hover,
    .bmb-guided-shell .bmb-secondary-button:hover,
    .bmb-guided-shell .bmb-dialog-close:hover,
    .bmb-guided-shell .bmb-reset-button:hover {
        background: var(--bmb-adaptive-surface-soft) !important;
    }
}


/* 1.1.246 — Promotion contrast polish for default adaptive palette. */
.bmb-guided-shell,
.bmb-calculator,
.bmb-ingredient-table-container,
.bmb-presets-container,
.bmb-disclaimer {
    --bmb-adaptive-button-text: var(--global-palette9, var(--wp--preset--color--base, #ffffff));
    --bmb-adaptive-active-surface: color-mix(in srgb, var(--bmb-adaptive-primary) 12%, var(--bmb-adaptive-surface) 88%);
    --bmb-adaptive-hover-surface: color-mix(in srgb, var(--bmb-adaptive-primary) 8%, var(--bmb-adaptive-surface) 92%);
    --bmb-adaptive-divider: color-mix(in srgb, var(--bmb-adaptive-border) 68%, var(--bmb-adaptive-text) 12%, var(--bmb-adaptive-surface) 20%);
    --bmb-adaptive-elevation-shadow: 0 18px 42px color-mix(in srgb, var(--bmb-adaptive-text) 14%, transparent);
}

.bmb-guided-shell .bmb-bowl-toggle,
.bmb-guided-shell .bmb-primary-button,
.bmb-guided-shell .bmb-apply-suggestion,
.bmb-guided-shell .bmb-apply-swap,
.bmb-guided-shell .bmb-receipt-print,
.bmb-guided-shell .bmb-receipt-export,
.bmb-guided-shell .bmb-save-build-button,
.bmb-guided-shell button[data-bmb-save-build],
.bmb-guided-shell button[data-bmb-apply-suggestion],
.bmb-guided-shell button[data-bmb-apply-swap] {
    color: var(--bmb-adaptive-button-text) !important;
}

.bmb-guided-shell .bmb-mobile-summary,
.bmb-guided-shell .bmb-meal-dialog-panel,
.bmb-guided-shell .bmb-mobile-bowl-drawer {
    box-shadow: var(--bmb-adaptive-elevation-shadow) !important;
}

.bmb-guided-shell .bmb-mobile-summary .bmb-nutrition-value,
.bmb-guided-shell .bmb-meal-dialog-panel .bmb-nutrition-value,
.bmb-guided-shell .bmb-receipt-card .bmb-nutrition-value {
    color: var(--bmb-adaptive-text) !important;
}

.bmb-guided-shell .bmb-mobile-summary .bmb-nutrition-label,
.bmb-guided-shell .bmb-meal-dialog-panel .bmb-nutrition-label,
.bmb-guided-shell .bmb-receipt-card .bmb-nutrition-label {
    color: var(--bmb-adaptive-text-muted) !important;
}

.bmb-guided-shell .bmb-flow-chip,
.bmb-guided-shell .bmb-setup-summary-pill,
.bmb-guided-shell .bmb-goal-match-pill,
.bmb-guided-shell .bmb-receipt-pill,
.bmb-guided-shell .bmb-chip {
    background: var(--bmb-adaptive-hover-surface) !important;
    border-color: var(--bmb-adaptive-divider) !important;
}

.bmb-guided-shell .bmb-flow-chip strong,
.bmb-guided-shell .bmb-receipt-pill strong,
.bmb-guided-shell .bmb-source-history-summary strong {
    color: var(--bmb-adaptive-primary) !important;
}

.bmb-guided-shell table,
.bmb-ingredient-table-container table,
.bmb-presets-container table {
    border-color: var(--bmb-adaptive-divider) !important;
}

.bmb-guided-shell th,
.bmb-guided-shell td,
.bmb-ingredient-table-container th,
.bmb-ingredient-table-container td,
.bmb-presets-container th,
.bmb-presets-container td {
    border-color: var(--bmb-adaptive-divider) !important;
    color: var(--bmb-adaptive-text) !important;
}

.bmb-guided-shell th,
.bmb-ingredient-table-container th,
.bmb-presets-container th {
    background: var(--bmb-adaptive-surface-soft) !important;
}

.bmb-guided-shell details,
.bmb-guided-shell summary,
.bmb-disclaimer details,
.bmb-disclaimer summary {
    border-color: var(--bmb-adaptive-divider) !important;
    color: var(--bmb-adaptive-text) !important;
}

@supports not (color: color-mix(in srgb, red 10%, white 90%)) {
    .bmb-guided-shell,
    .bmb-calculator,
    .bmb-ingredient-table-container,
    .bmb-presets-container,
    .bmb-disclaimer {
        --bmb-adaptive-button-text: #ffffff;
        --bmb-adaptive-active-surface: var(--bmb-adaptive-surface-soft);
        --bmb-adaptive-hover-surface: var(--bmb-adaptive-surface-soft);
        --bmb-adaptive-divider: var(--bmb-adaptive-border);
        --bmb-adaptive-elevation-shadow: 0 18px 42px rgba(74, 45, 18, 0.14);
    }
}

/* 1.1.247 — Kadence-aware section tab count icon polish. */
.bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon,
.bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon {
    background: color-mix(in srgb, var(--bmb-adaptive-primary) 12%, var(--bmb-adaptive-surface) 88%) !important;
    border-color: color-mix(in srgb, var(--bmb-adaptive-primary) 40%, var(--bmb-adaptive-border) 60%) !important;
    color: var(--bmb-adaptive-primary) !important;
}

.bmb-guided-shell[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab-count,
.bmb-calculator[data-bmb-section-tab-count-icon-ui="1.1.247"] .bmb-category-tab-count {
    display: none !important;
}

/* 1.1.248 — Kadence-aware section tab count portion-chip polish. */
.bmb-guided-shell[data-bmb-section-tab-count-portion-chip-ui="1.1.248"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon,
.bmb-calculator[data-bmb-section-tab-count-portion-chip-ui="1.1.248"] .bmb-category-tab.bmb-category-tab-has-selection .bmb-category-tab-icon {
    border-color: color-mix(in srgb, var(--bmb-adaptive-primary) 88%, var(--bmb-adaptive-border) 12%) !important;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--bmb-adaptive-primary) 82%, #ffffff 18%) 0%,
        color-mix(in srgb, var(--bmb-adaptive-primary) 92%, #000000 8%) 100%
    ) !important;
    color: var(--bmb-adaptive-button-text, #ffffff) !important;
    text-shadow: 0 1px 1px color-mix(in srgb, var(--bmb-adaptive-primary) 45%, #000000 55%);
    box-shadow:
        0 6px 14px color-mix(in srgb, var(--bmb-adaptive-primary) 24%, transparent),
        inset 0 1px 0 color-mix(in srgb, var(--bmb-adaptive-button-text, #ffffff) 30%, transparent) !important;
}
