/*
 * MyKetchum Phase 20A.4.2 live stylesheet-load repair.
 * Scope: public homepage/header only. This file is intentionally enqueued last.
 */

@media (max-width: 760px) {
  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-approved {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas:
      "logo menu"
      "tools tools"
      "benefits benefits" !important;
    gap: 7px 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 8px 10px 10px !important;
    box-sizing: border-box !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-logo {
    grid-area: logo !important;
    min-width: 0 !important;
    justify-self: start !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-logo img {
    display: block !important;
    width: auto !important;
    max-width: min(205px, calc(100vw - 78px)) !important;
    max-height: 54px !important;
    object-fit: contain !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-menu-toggle {
    grid-area: menu !important;
    display: inline-flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 9px !important;
    justify-self: end !important;
    background: #004c3f !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-menu-toggle > span:not(.screen-reader-text) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 3px !important;
    background: #ffffff !important;
    border-radius: 2px !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-search-tools {
    grid-area: tools !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 48px !important;
    grid-template-rows: 46px 46px !important;
    grid-template-areas:
      "store cart"
      "search search" !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-store-picker {
    grid-area: store !important;
    min-width: 0 !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-shop-by-store {
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 32px 0 12px !important;
    font-size: 14px !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-search {
    grid-area: search !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 46px !important;
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-search input,
  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-search button {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-search input {
    min-width: 0 !important;
    padding: 0 11px !important;
    font-size: 14px !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-search button {
    width: 46px !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-cart {
    grid-area: cart !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 48px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 !important;
    padding: 0 4px !important;
    justify-self: end !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-benefits {
    grid-area: benefits !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-benefits > a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 5px 8px !important;
    gap: 6px !important;
    overflow: hidden !important;
    text-align: left !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-benefits img {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-benefits span {
    min-width: 0 !important;
    overflow: visible !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-benefits strong {
    display: block !important;
    min-width: 0 !important;
    font-size: 10.5px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: left !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-benefits small {
    display: none !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-approved-main {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 10px !important;
    overflow: visible !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-path-priority {
    margin-top: 14px !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-lead-actions {
    box-sizing: border-box !important;
    padding-right: 72px !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-home-quick-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 8px 0 0 !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-home-quick-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    min-height: 58px !important;
    height: auto !important;
    padding: 9px 10px !important;
    gap: 8px !important;
    border-radius: 11px !important;
    text-align: left !important;
    overflow: hidden !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-home-quick-card .mkch-icon {
    width: 23px !important;
    height: 23px !important;
    flex: 0 0 23px !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-home-quick-card span:last-child {
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: 11.5px !important;
    line-height: 1.12 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  /* Nine current actions leave one final card. Span the safe content width. */
  html body .mkch-shell.mkch-approved-home .mkch-home-quick-actions > .mkch-home-quick-card:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    justify-self: stretch !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-promotion-grid,
  html body .mkch-shell.mkch-approved-home .mkch-category-grid-approved {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: stretch !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-promotion-card,
  html body .mkch-shell.mkch-approved-home .mkch-category-card {
    display: grid !important;
    grid-template-rows: auto auto !important;
    align-content: start !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
}

@media (max-width: 390px) {
  html body .mkch-shell.mkch-approved-home .mkch-home-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-home-quick-card {
    min-height: 56px !important;
    padding: 8px 8px !important;
    gap: 7px !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-home-quick-card span:last-child {
    font-size: 10.5px !important;
  }

  html body .mkch-shell.mkch-approved-home .mkch-static-header .mkch-header-benefits strong {
    font-size: 10px !important;
  }
}

@media (max-width: 340px) {
  html body .mkch-shell.mkch-approved-home .mkch-home-quick-card span:last-child {
    font-size: 9.75px !important;
  }
}
