/* myMondo Logistics 3.9.0 — configurable readable text and button colors.
 * Uses sanitized Customizer/theme-admin variables. CSS ONLY, no DOM injection.
 * Rules are deliberately last in the cascade to supersede older hardcoded
 * visual colors, while leaving WooCommerce behavior, forms and payment JS alone.
 */

/* Menu and footer typography can also be edited from this same palette. */
body.mm-theme .mm-header .mm-nav-links > li > a,
body.mm-theme .mm-header .mm-nav-links .sub-menu a,
body.mm-theme .mm-header :is(.mm-account,.mm-cart) {
  color:var(--mm-text-navigation,#09265b)!important;
}
body.mm-theme .mm-header .mm-nav-links > li:is(:hover,.current-menu-item,.current-menu-ancestor) > a,
body.mm-theme .mm-header .mm-nav-links a:is(:hover,:focus-visible),
body.mm-theme .mm-header .mm-nav-links .sub-menu a:is(:hover,:focus-visible) {
  color:var(--mm-text-navigation-hover,#ff5b23)!important;
}
body.mm-theme .mm-footer :is(p,small,.mm-footer-bottom) {
  color:var(--mm-text-footer,#dce8fb)!important;
}
/* Preserve the normal footer text color for unvisited and visited links.
   Hover, active click and the current WP menu item each have a separate color. */
body.mm-theme .mm-footer a:not(.mm-footer-logo),
body.mm-theme .mm-footer a:not(.mm-footer-logo):visited {
  color:var(--mm-text-footer,#dce8fb)!important;
  transition:color .16s ease;
}
body.mm-theme .mm-footer a:not(.mm-footer-logo):is(:hover,:focus-visible) {
  color:var(--mm-text-footer-link-hover,#ffae87)!important;
}
body.mm-theme .mm-footer a:not(.mm-footer-logo):active,
body.mm-theme .mm-footer :is(.current-menu-item,.current_page_item,.current-menu-ancestor,.current_page_ancestor) > a:not(.mm-footer-logo),
body.mm-theme .mm-footer a:not(.mm-footer-logo)[aria-current="page"] {
  color:var(--mm-text-footer-link-active,#ff6123)!important;
}
body.mm-theme .mm-footer :is(h2,h3,h4) {
  color:var(--mm-text-footer-heading,#ffffff)!important;
}

/* Text across ordinary pages and WooCommerce pages. Navigation/footer keep
 * their distinct brand palette, already configurable in theme settings. */
body.mm-theme { color:var(--mm-text-main,#253d5d); }
body.mm-theme :is(.mm-page-content,.mm-editor-content,.mm-article,.mm-product-info,.mm-shop-body,.mm-steps-bar) {
  color:var(--mm-text-main,#253d5d);
}
body.mm-theme .woocommerce,
body.mm-theme .woocommerce-account .woocommerce-MyAccount-content {
  color:var(--mm-text-main,#253d5d);
}
body.mm-theme.single-product .woocommerce :is(.product,.summary,.woocommerce-tabs,.woocommerce-product-details__short-description,.woocommerce-product-details__short-description p),
body.mm-theme .woocommerce ul.products li.product,
body.mm-theme .woocommerce ul.products li.product .woocommerce-loop-product__title {
  color:var(--mm-text-product,#253d5d);
}
body.mm-theme.woocommerce-cart .woocommerce :is(.shop_table,.cart-collaterals,.cart_totals,.woocommerce-cart-form),
body.mm-theme .wc-block-cart :is(.wc-block-cart-items,.wc-block-cart__totals-title,.wc-block-components-product-metadata),
body.mm-theme .wp-block-woocommerce-cart {
  color:var(--mm-text-cart,#253d5d);
}
body.mm-theme.woocommerce-checkout .woocommerce form.checkout,
body.mm-theme.woocommerce-checkout .woocommerce :is(#order_review,#payment,.woocommerce-checkout-review-order),
body.mm-theme .wc-block-checkout,
body.mm-theme .wp-block-woocommerce-checkout {
  color:var(--mm-text-checkout,#253d5d);
}

/* Consistent heading colors, including the order & payment headings that were
 * previously hardcoded to #202020 with !important declarations. */
body.mm-theme :is(.mm-page-content,.mm-commerce-shell,.mm-editor-content,.mm-article,.mm-page-hero) :is(h1,h2,h3,h4,h5,h6),
body.mm-theme .woocommerce :is(.product_title,.woocommerce-loop-product__title,.cart_totals h2,.woocommerce-billing-fields h3,.woocommerce-shipping-fields h3),
body.mm-theme .wc-block-components-title,
body.mm-theme .wc-block-components-checkout-step__heading-title {
  color:var(--mm-text-heading,#202020)!important;
}
body.mm-theme.woocommerce-checkout #order_review_heading,
body.mm-theme.woocommerce-checkout .woocommerce #order_review_heading,
body.mm-theme.woocommerce-checkout .woocommerce :is(#payment_heading,.payment-methods-heading,.payment_methods_heading),
body.mm-theme.woocommerce-checkout #order_review_heading :is(span,strong,b,em) {
  color:var(--mm-text-heading,#202020)!important;
  -webkit-text-fill-color:var(--mm-text-heading,#202020)!important;
}

/* Secondary explanatory material and small-print: don't recolor notices,
 * validation hints or special badges that convey errors/success. */
body.mm-theme :is(.mm-product-info,.mm-page-hero p,.mm-hero-points,.mm-eyebrow,.mm-steps-bar,.mm-logo-caption),
body.mm-theme .woocommerce :is(.woocommerce-product-attributes-item__value,.product_meta,.woocommerce-breadcrumb,.woocommerce-review-link,.woocommerce-shipping-destination,.woocommerce-shipping-calculator p),
body.mm-theme .woocommerce :is(.woocommerce-tabs .comment-text .meta,.order-info),
body.mm-theme .wc-block-components-product-metadata,
body.mm-theme .wc-block-components-totals-item__description {
  color:var(--mm-text-secondary,#586e8b)!important;
}

/* Text labels in product variation rows, checkout forms, tables, shipping and
 * classic payment-method captions (not their hosted card fields). */
body.mm-theme .woocommerce form .form-row > label:not(.checkbox):not(.woocommerce-form__label-for-checkbox),
body.mm-theme.single-product .woocommerce div.product form.variations_form table.variations th label,
body.mm-theme .woocommerce :is(.shop_table th,.cart_totals th,.woocommerce-product-attributes th),
body.mm-theme.woocommerce-checkout .woocommerce form.checkout #order_review table.woocommerce-checkout-review-order-table :is(thead th,tfoot th),
body.mm-theme.woocommerce-checkout .woocommerce #payment ul.payment_methods > li > label,
body.mm-theme .wc-block-components-text-input label,
body.mm-theme .wc-block-components-combobox label,
body.mm-theme .wc-block-components-checkbox label {
  color:var(--mm-text-label,#202020)!important;
}

/* Price palette: the formerly fixed black product price range is now editable. */
body.mm-theme.single-product .woocommerce div.product .summary :is(p.price,span.price,.price,.woocommerce-variation-price),
body.mm-theme.single-product .woocommerce div.product .summary .price :is(bdi,.woocommerce-Price-amount),
body.mm-theme.single-product .woocommerce div.product .summary .woocommerce-variation-price :is(.amount,bdi),
body.mm-theme .woocommerce ul.products li.product :is(.price,.price bdi,.woocommerce-Price-amount),
body.mm-theme .woocommerce .shop_table .woocommerce-Price-amount,
body.mm-theme .woocommerce .cart_totals .woocommerce-Price-amount,
body.mm-theme.woocommerce-checkout .woocommerce #order_review .woocommerce-Price-amount,
body.mm-theme .woocommerce .woocommerce-Price-amount :is(bdi,span.woocommerce-Price-currencySymbol),
body.mm-theme .wc-block-components-formatted-money-amount,
body.mm-theme .wc-block-components-product-price,
body.mm-theme .wc-block-components-totals-item__value {
  color:var(--mm-text-price,#111111)!important;
}

/* Editable input/select colors; native control dimensions/validation unchanged. */
body.mm-theme .woocommerce :is(input.input-text,input[type="text"],input[type="email"],input[type="tel"],input[type="number"],input[type="search"],input[type="date"],textarea,select):not([type="hidden"]):not(:disabled),
body.mm-theme.single-product .woocommerce div.product form.variations_form table.variations :is(button.mmwl-variation-trigger,select:not(.mmwl-native-control)),
body.mm-theme.woocommerce-checkout .woocommerce form.checkout .select2-selection__rendered,
body.mm-theme .wc-block-components-text-input input,
body.mm-theme .wc-block-components-combobox input,
body.mm-theme .wc-block-components-combobox .wc-block-components-combobox-control__selected-value {
  color:var(--mm-text-field,#202020)!important;
}
body.mm-theme .woocommerce :is(input,textarea)::placeholder,
body.mm-theme .wc-block-components-text-input input::placeholder,
body.mm-theme .wc-block-components-combobox input::placeholder {
  color:var(--mm-text-placeholder,#71849e)!important;
  opacity:1;
}
/* Select2/SelectWoo menu may be appended directly to body by WooCommerce. */
body.mm-theme.woocommerce-checkout .select2-container--open .select2-results__option,
body.mm-theme.woocommerce-checkout .select2-container--open .select2-search__field {
  color:var(--mm-text-field,#202020);
}

/* Links are already editable as 'Ссылки' in the older palette. */
body.mm-theme :is(.mm-page-content,.mm-commerce-shell,.mm-editor-content,.mm-product-info,.mm-article) a:not(.button):not(.mm-btn):not(.wc-block-components-button) {
  color:var(--mm-blue,#0b4b9a);
}
body.mm-theme :is(.mm-page-content,.mm-commerce-shell,.mm-editor-content,.mm-product-info,.mm-article) a:not(.button):not(.mm-btn):not(.wc-block-components-button):hover {
  color:var(--mm-link-hover,#eb4a17);
}

/* Primary buttons: shared across cart, checkout, store, account and normal
 * pages, without hijacking variation dropdown buttons or remove-item icons. */
body.mm-theme .mm-btn:not(.mm-btn-orange):not(.mm-head-cta),
body.mm-theme .woocommerce :is(a.button,button.button,input.button,#respond input#submit):not(.alt):not(.checkout-button):not(.single_add_to_cart_button):not(.mmwl-variation-trigger):not(.mmwl-customs-remove-button):not(.wc-backward):not([name="apply_coupon"]):not([name="update_cart"]),
body.mm-theme .mm-editor-content :is(button:not(.mmwl-variation-trigger):not(.mmwl-customs-remove-button),input[type="submit"]),
body.mm-theme .wp-element-button:not(.has-background):not(.has-text-color),
body.mm-theme .wp-block-button__link:not(.has-background):not(.has-text-color) {
  background:var(--mm-button-primary-bg,#0d4a96)!important;
  color:var(--mm-button-primary-text,#ffffff)!important;
  border-color:var(--mm-button-primary-bg,#0d4a96)!important;
}
body.mm-theme .mm-btn:not(.mm-btn-orange):not(.mm-head-cta):is(:hover,:focus-visible),
body.mm-theme .woocommerce :is(a.button,button.button,input.button,#respond input#submit):not(.alt):not(.checkout-button):not(.single_add_to_cart_button):not(.mmwl-variation-trigger):not(.mmwl-customs-remove-button):not(.wc-backward):not([name="apply_coupon"]):not([name="update_cart"]):is(:hover,:focus-visible),
body.mm-theme .mm-editor-content :is(button:not(.mmwl-variation-trigger):not(.mmwl-customs-remove-button),input[type="submit"]):is(:hover,:focus-visible),
body.mm-theme .wp-element-button:not(.has-background):not(.has-text-color):is(:hover,:focus-visible),
body.mm-theme .wp-block-button__link:not(.has-background):not(.has-text-color):is(:hover,:focus-visible) {
  background:var(--mm-button-primary-hover-bg,#083a7c)!important;
  color:var(--mm-button-primary-hover-text,#ffffff)!important;
  border-color:var(--mm-button-primary-hover-bg,#083a7c)!important;
}

/* Accent actions: add to cart, complete order, cart -> checkout and header CTA.
 * Covers classic Woo checkout and standard Woo Blocks. */
body.mm-theme :is(.mm-btn-orange,.mm-head-cta),
body.mm-theme .woocommerce :where(a.button.alt,button.button.alt,input.button.alt,#respond input#submit.alt,.single_add_to_cart_button,.checkout-button,#place_order),
body.mm-theme .wc-block-components-checkout-place-order-button,
body.mm-theme .wc-block-cart__submit-container .wc-block-components-button {
  background:var(--mm-button-accent-bg,#ff6123)!important;
  color:var(--mm-button-accent-text,#ffffff)!important;
  border-color:var(--mm-button-accent-bg,#ff6123)!important;
}
body.mm-theme :is(.mm-btn-orange,.mm-head-cta):is(:hover,:focus-visible),
body.mm-theme .woocommerce :where(a.button.alt,button.button.alt,input.button.alt,#respond input#submit.alt,.single_add_to_cart_button,.checkout-button,#place_order):is(:hover,:focus-visible),
body.mm-theme .wc-block-components-checkout-place-order-button:is(:hover,:focus-visible),
body.mm-theme .wc-block-cart__submit-container .wc-block-components-button:is(:hover,:focus-visible) {
  background:var(--mm-button-accent-hover-bg,#e64f1b)!important;
  color:var(--mm-button-accent-hover-text,#ffffff)!important;
  border-color:var(--mm-button-accent-hover-bg,#e64f1b)!important;
}

/* Secondary actions: retain outline design and their separate colors. */
body.mm-theme .woocommerce :is(button[name="apply_coupon"],button[name="update_cart"],.coupon .button,a.button.wc-backward),
body.mm-theme .woocommerce .woocommerce-form-coupon button.button,
body.mm-theme .wc-block-components-button.is-secondary {
  background:var(--mm-button-secondary-bg,#f4f7fb)!important;
  color:var(--mm-button-secondary-text,#09265b)!important;
  border:1px solid var(--mm-button-secondary-border,#dce5ee)!important;
}
body.mm-theme .woocommerce :is(button[name="apply_coupon"],button[name="update_cart"],.coupon .button,a.button.wc-backward):is(:hover,:focus-visible),
body.mm-theme .woocommerce .woocommerce-form-coupon button.button:is(:hover,:focus-visible),
body.mm-theme .wc-block-components-button.is-secondary:is(:hover,:focus-visible) {
  background:var(--mm-button-secondary-hover-bg,#e9f1fc)!important;
  color:var(--mm-button-secondary-hover-text,#09265b)!important;
}

/* Order / payment section rhythm: extra white space and matching row dividers.
 * Woo native ul/li markup, radio inputs, payment_box and gateway JS untouched. */
body.mm-theme.woocommerce-checkout .woocommerce form.checkout #order_review table.woocommerce-checkout-review-order-table {
  margin-bottom:16px!important;
}
body.mm-theme.woocommerce-checkout .woocommerce form.checkout #payment {
  margin-top:32px!important;
  margin-bottom:28px!important;
}
body.mm-theme.woocommerce-checkout .woocommerce form.checkout :is(#payment_heading,.payment-methods-heading,.payment_methods_heading) {
  margin-top:30px!important;
  margin-bottom:16px!important;
  padding-bottom:12px!important;
  border-bottom:2px solid #273545!important;
}
body.mm-theme.woocommerce-checkout .woocommerce form.checkout #payment ul.payment_methods {
  border-top:0;
  border-bottom:1px solid #e0e5eb!important;
  padding:8px 14px 12px!important;
}
body.mm-theme.woocommerce-checkout .woocommerce form.checkout #payment ul.payment_methods > li {
  padding:15px 8px!important;
  margin:0!important;
  border-bottom:1px solid #e0e5eb!important;
  border-radius:0!important;
}
body.mm-theme.woocommerce-checkout .woocommerce form.checkout #payment ul.payment_methods > li + li {
  border-top:0!important;
}
body.mm-theme.woocommerce-checkout .woocommerce form.checkout #payment ul.payment_methods > li:last-child {
  border-bottom:0!important;
}
body.mm-theme.woocommerce-checkout .woocommerce form.checkout #payment ul.payment_methods > li:nth-child(even) {
  background:#fafbfc;
}
body.mm-theme.woocommerce-checkout .woocommerce form.checkout #payment .place-order {
  border-top:1px solid #e0e5eb!important;
  padding-bottom:22px!important;
}
@media(max-width:600px) {
  body.mm-theme.woocommerce-checkout .woocommerce form.checkout #payment ul.payment_methods {
    padding:6px 10px 12px!important;
  }
  body.mm-theme.woocommerce-checkout .woocommerce form.checkout #payment .place-order {
    padding-bottom:20px!important;
  }
}
