/* vFINAL identity colors: enforce storefront color settings without touching status colors */
.msf-shell,
.msf-wrap,
.msf-projects,
.msf-native-page-shell,
.msf-projects-native-shell{
  color:var(--msf-text,#0f172a) !important;
  background:var(--msf-page-bg,#f8fafc) !important;
}

/* Header colors */
html body .msf-shell .msf-header,
html body .msf-header{
  background:var(--msf-header-bg,#ffffff) !important;
  color:var(--msf-header-text,#0f172a) !important;
  border-color:color-mix(in srgb, var(--msf-header-text,#0f172a) 12%, transparent) !important;
}
html body .msf-header .msf-brand,
html body .msf-header .msf-brand span,
html body .msf-header .msf-nav a,
html body .msf-header .msf-mobile-toggle,
html body .msf-header .msf-header-cart,
html body .msf-header .msf-login-btn-modern{
  color:var(--msf-header-text,#0f172a) !important;
}
html body .msf-header .msf-mobile-toggle span{
  background:var(--msf-header-text,#0f172a) !important;
}

/* Main button colors: login, cart, project donate, cart buttons, quick donate, filters */
html body .msf-shell .msf-btn,
html body .msf-shell .msf-btn-primary,
html body .msf-shell .msf-btn-secondary,
html body .msf-shell .msf-btn-gold,
html body .msf-shell .msf-modern-primary,
html body .msf-shell .msf-filter-apply,
html body .msf-shell .msf-general-donation-submit button,
html body .msf-shell .msf-pro-submit,
html body .msf-shell .msf-quick-donate-action,
html body .msf-shell .msf-cart-pay-main,
html body .msf-shell .msf-mini-view,
html body .msf-shell .msf-mini-continue,
html body .msf-shell .msf-cart-login,
html body .msf-shell .msf-cart-register,
html body .msf-shell .msf-cart-guest,
html body .msf-shell .msf-header .msf-login-btn-modern,
html body .msf-shell .msf-header .msf-header-cart,
html body .msf-shell button[data-msf-cart-pay],
html body .msf-shell button[data-msf-pay-guest],
html body .msf-shell a[data-msf-cart-login-link]{
  background:var(--msf-global-button-bg,var(--msf-primary,#16a34a)) !important;
  background-image:none !important;
  color:var(--msf-global-button-color,#ffffff) !important;
  border-color:var(--msf-global-button-bg,var(--msf-primary,#16a34a)) !important;
}
html body .msf-shell .msf-header .msf-login-btn-modern svg,
html body .msf-shell .msf-header .msf-login-btn-modern path,
html body .msf-shell .msf-header .msf-header-cart *,
html body .msf-shell .msf-btn *,
html body .msf-shell .msf-pro-submit *,
html body .msf-shell .msf-cart-pay-main *,
html body .msf-shell .msf-mini-view *,
html body .msf-shell .msf-mini-continue *{
  color:var(--msf-global-button-color,#ffffff) !important;
  stroke:currentColor !important;
}
html body .msf-shell .msf-btn:hover,
html body .msf-shell .msf-pro-submit:hover,
html body .msf-shell .msf-cart-pay-main:hover,
html body .msf-shell .msf-header .msf-login-btn-modern:hover,
html body .msf-shell .msf-header .msf-header-cart:hover{
  filter:brightness(.94) !important;
}

/* Do not recolor functional buttons */
html body .msf-shell .msf-cart-delete,
html body .msf-shell [data-msf-cart-clear],
html body .msf-shell .msf-remove,
html body .msf-shell .msf-delete{
  background:#fee2e2 !important;
  color:#dc2626 !important;
  border-color:#fecaca !important;
}


/* v1.7.1 definitive color binding fix */
html body .msf-shell[style] .msf-header,
html body .msf-shell[style] header.msf-header{
  background:var(--msf-header-bg,#ffffff) !important;
  color:var(--msf-header-text,#0f172a) !important;
}
html body .msf-shell[style] .msf-header .msf-brand,
html body .msf-shell[style] .msf-header .msf-brand span,
html body .msf-shell[style] .msf-header .msf-nav a,
html body .msf-shell[style] .msf-header .msf-mobile-toggle{
  color:var(--msf-header-text,#0f172a) !important;
}
html body .msf-shell[style] .msf-header .msf-mobile-toggle span{
  background:var(--msf-header-text,#0f172a) !important;
}
html body .msf-shell[style] .msf-header .msf-nav{
  background:var(--msf-header-bg,#ffffff) !important;
}
html body .msf-shell[style] .msf-header .msf-login-btn-modern,
html body .msf-shell[style] .msf-header .msf-header-cart,
html body .msf-shell[style] .msf-btn,
html body .msf-shell[style] .msf-btn-primary,
html body .msf-shell[style] .msf-btn-secondary,
html body .msf-shell[style] .msf-btn-gold,
html body .msf-shell[style] .msf-pro-submit,
html body .msf-shell[style] .msf-cart-pay-main,
html body .msf-shell[style] .msf-mini-view,
html body .msf-shell[style] button[data-msf-cart-pay],
html body .msf-shell[style] button[data-msf-pay-guest],
html body .msf-shell[style] a[data-msf-cart-login-link]{
  background:var(--msf-global-button-bg,var(--msf-primary,#16a34a)) !important;
  background-image:none !important;
  color:var(--msf-global-button-color,#ffffff) !important;
  border-color:var(--msf-global-button-bg,var(--msf-primary,#16a34a)) !important;
}
html body .msf-shell[style] .msf-header .msf-login-btn-modern *,
html body .msf-shell[style] .msf-header .msf-header-cart *,
html body .msf-shell[style] .msf-btn *,
html body .msf-shell[style] .msf-pro-submit *,
html body .msf-shell[style] .msf-cart-pay-main *,
html body .msf-shell[style] .msf-mini-view *{
  color:var(--msf-global-button-color,#ffffff) !important;
  stroke:currentColor !important;
}

/* v1.7.2: front-controlled quick donation colors */
.msf-quick-donate-card{
  background:var(--msf-quick-card-bg,#fff)!important;
  border-color:var(--msf-quick-active-bg,#e5e7eb)!important;
  color:var(--msf-quick-card-title,#0f172a)!important;
}
.msf-quick-donate-icon{
  background:var(--msf-quick-primary,#10b981)!important;
  color:var(--msf-quick-primary-text,#fff)!important;
}
.msf-quick-donate-card h3{color:var(--msf-quick-card-title,#0f172a)!important}
.msf-quick-donate-card p{color:var(--msf-quick-card-text,#64748b)!important}
.msf-quick-donate-action{
  background:var(--msf-quick-primary,#10b981)!important;
  color:var(--msf-quick-primary-text,#fff)!important;
}
.msf-quick-donate-note{color:var(--msf-quick-active-text,var(--msf-quick-primary,#047857))!important}
#msf-qd-native-host .miyaar-qd-panel,
#msf-qd-native-host .miyaar-qd-thanks-panel,
#msf-qd-native-host .miyaar-qd-receipt-panel,
.miyaar-quick-donate-wrap .miyaar-qd-panel,
.miyaar-quick-donate-wrap .miyaar-qd-thanks-panel,
.miyaar-quick-donate-wrap .miyaar-qd-receipt-panel{
  background:var(--miyaar-qd-modal-bg,#fff)!important;
}
#msf-qd-native-host .miyaar-qd-title,
#msf-qd-native-host .miyaar-qd-thanks-title,
#msf-qd-native-host .miyaar-qd-field label,
.miyaar-quick-donate-wrap .miyaar-qd-title,
.miyaar-quick-donate-wrap .miyaar-qd-thanks-title,
.miyaar-quick-donate-wrap .miyaar-qd-field label{
  color:var(--miyaar-qd-modal-title-text,#0f172a)!important;
}
#msf-qd-native-host .miyaar-qd-subtitle,
#msf-qd-native-host .miyaar-qd-secure,
#msf-qd-native-host .miyaar-qd-or,
.miyaar-quick-donate-wrap .miyaar-qd-subtitle,
.miyaar-quick-donate-wrap .miyaar-qd-secure,
.miyaar-quick-donate-wrap .miyaar-qd-or{
  color:var(--miyaar-qd-modal-text,#64748b)!important;
}
/* Quick donation identity: the heart is intentionally fixed and must never inherit
   the selected-amount palette. The badge remains themeable from the backend UI tokens. */
#msf-qd-native-host .miyaar-qd-heart,
.miyaar-quick-donate-wrap .miyaar-qd-heart{
  background:#ecfdf5!important;
  color:#059669!important;
  border-color:#a7f3d0!important;
  opacity:1!important;
  -webkit-text-fill-color:#059669!important;
}
#msf-qd-native-host .miyaar-qd-badge,
.miyaar-quick-donate-wrap .miyaar-qd-badge{
  background:var(--miyaar-qd-modal-selected-bg,#ecfdf5)!important;
  color:var(--miyaar-qd-modal-selected-text,#047857)!important;
  border-color:var(--miyaar-qd-modal-selected-bg,#ecfdf5)!important;
  opacity:1!important;
  -webkit-text-fill-color:var(--miyaar-qd-modal-selected-text,#047857)!important;
}
#msf-qd-native-host .miyaar-qd-tab,
#msf-qd-native-host .miyaar-qd-item,
#msf-qd-native-host .miyaar-qd-amount,
.miyaar-quick-donate-wrap .miyaar-qd-tab,
.miyaar-quick-donate-wrap .miyaar-qd-item,
.miyaar-quick-donate-wrap .miyaar-qd-amount{
  background:var(--miyaar-qd-modal-field-bg,#fff)!important;
  color:var(--miyaar-qd-modal-field-text,#0f172a)!important;
}
#msf-qd-native-host .miyaar-qd-chip,
.miyaar-quick-donate-wrap .miyaar-qd-chip{
  background:var(--miyaar-qd-modal-amount-bg,#fff)!important;
  color:var(--miyaar-qd-modal-number-text,#0f172a)!important;
}
#msf-qd-native-host .miyaar-qd-chip.is-active,
#msf-qd-native-host .miyaar-qd-tab.is-active,
.miyaar-quick-donate-wrap .miyaar-qd-chip.is-active,
.miyaar-quick-donate-wrap .miyaar-qd-tab.is-active{
  background:var(--miyaar-qd-modal-selected-bg,#ecfdf5)!important;
  border-color:var(--miyaar-qd-modal-icon,#10b981)!important;
  color:var(--miyaar-qd-modal-selected-text,#047857)!important;
}
#msf-qd-native-host .miyaar-qd-next,
#msf-qd-native-host .miyaar-qd-open-receipt,
.miyaar-quick-donate-wrap .miyaar-qd-next,
.miyaar-quick-donate-wrap .miyaar-qd-open-receipt{
  background:var(--miyaar-qd-modal-button-bg,#10b981)!important;
  color:var(--miyaar-qd-modal-button-text,#fff)!important;
}


/* Mobile fix: project opportunity status badge */
@media (max-width: 768px){
  .msf-projects-pro .msf-pro-status,
  .msf-modern-projects-pro .msf-pro-status{
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    min-width: auto !important;
    max-width: calc(100% - 16px) !important;
    padding: 5px 9px !important;
    gap: 4px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    border-radius: 999px !important;
    z-index: 5 !important;
    box-shadow: 0 6px 14px rgba(15,23,42,.12) !important;
  }
  .msf-projects-pro .msf-pro-status:before,
  .msf-modern-projects-pro .msf-pro-status:before{
    font-size: 13px !important;
    line-height: 1 !important;
  }
}

/* v2.5.1 unified quick-donation border color */
#msf-qd-native-host .miyaar-quick-donate-wrap .miyaar-qd-modal,#msf-qd-native-host .miyaar-quick-donate-wrap input,#msf-qd-native-host .miyaar-quick-donate-wrap select,#msf-qd-native-host .miyaar-quick-donate-wrap .miyaar-qd-amount,.miyaar-quick-donate-wrap .miyaar-qd-modal,.miyaar-quick-donate-wrap input,.miyaar-quick-donate-wrap select,.miyaar-quick-donate-wrap .miyaar-qd-amount{border-color:var(--miyaar-qd-modal-border,#dbe5e1)!important}.msf-quick-donate-card{border-color:var(--msf-quick-border,#dbe5e1)!important}

/* v2.12.1 — ensure the actual premium header always consumes saved header colors */
html body .msf-head-wrap .msf-pro-header,
html body .msf-head-wrap .msf-pro-nav{
  background:var(--msf-header-bg,#ffffff) !important;
}
html body .msf-head-wrap .msf-pro-brand,
html body .msf-head-wrap .msf-pro-brand b,
html body .msf-head-wrap .msf-pro-brand small,
html body .msf-head-wrap .msf-pro-nav a{
  color:var(--msf-header-text,#0f172a) !important;
}


/* v2.12.2 critical mobile premium-header safeguards (loaded last). */
@media (max-width:960px){
  html body .msf-head-wrap > .msf-pro-topbar{display:block!important;visibility:visible!important;opacity:1!important;background:var(--msf-topbar-bg,#0b2942)!important;color:var(--msf-topbar-text,#fff)!important;}
  html body .msf-head-wrap > .msf-pro-topbar .msf-pro-topbar-inner{display:flex!important;min-height:30px!important;height:auto!important;}
  html body .msf-head-wrap > .msf-pro-header .msf-mobile-toggle:before,
  html body .msf-head-wrap > .msf-pro-header .msf-mobile-toggle:after{content:none!important;display:none!important;}
}


/* v2.12.3 loaded-last premium mobile header safeguards */
@media (max-width:960px){
  html body:has(.msf-head-wrap .msf-pro-header){padding-top:0!important;margin-top:0!important;}
  html body .msf-head-wrap{margin-top:0!important;padding-top:0!important;}
  html body .msf-head-wrap > .msf-pro-topbar{margin-top:0!important;background:var(--msf-topbar-bg,#0b2942)!important;color:var(--msf-topbar-text,#fff)!important;}
  html body .msf-head-wrap > .msf-pro-topbar *{color:var(--msf-topbar-text,#fff)!important;}
  html body .msf-head-wrap .msf-pro-topbar-account > a:first-child{font-size:12.5px!important;font-weight:900!important;line-height:1.2!important;padding:2px 7px!important;}
  html body .msf-head-wrap .msf-pro-topbar-contact a{direction:ltr!important;unicode-bidi:plaintext!important;}
}
