/*
 * Murtagh Meats — shop selector v2.1
 * Compact, accessible and independent from the active WordPress theme.
 */

body.mm-store-selector-open {
  overflow: hidden;
}

.mm-store-selector,
.mm-store-selector *,
.mm-store-selector *::before,
.mm-store-selector *::after {
  box-sizing: border-box;
}

.mm-store-selector[hidden] {
  display: none !important;
}

.mm-store-selector {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: #24211f;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
  isolation: isolate;
}

.mm-store-selector-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(24, 21, 19, 0.72);
  backdrop-filter: blur(2px);
}

.mm-store-selector-panel {
  position: relative;
  width: min(100%, 640px);
  max-height: calc(100vh - 16px);
  max-height: calc(100svh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 22px 18px 18px;
  border: 1px solid #ded9d1;
  border-radius: 10px;
  background: #fffdf9;
  box-shadow: 0 18px 56px rgba(23, 19, 17, 0.3);
  outline: none;
  -webkit-overflow-scrolling: touch;
}

.mm-store-selector-panel h2 {
  max-width: calc(100% - 52px);
  margin: 0;
  color: #24211f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 7vw, 2rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.mm-store-selector-intro {
  margin: 7px 0 16px;
  color: #6b625d;
  font-size: 0.92rem;
  line-height: 1.45;
}

.mm-store-selector-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 0 11px;
  border: 1px solid #d9d3cb;
  border-radius: 5px;
  background: #fff;
  color: #39332f;
  font: 700 0.76rem/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.mm-store-selector-close[hidden] {
  display: none !important;
}

.mm-store-selector-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.mm-store-choice {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  padding: 14px;
  border: 1px solid #ded9d1;
  border-radius: 7px;
  background: #fff;
}

.mm-store-choice h3 {
  margin: 0 0 5px;
  color: #292522;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.2;
}

.mm-store-choice p {
  margin: 0 0 13px;
  color: #6c635e;
  font-size: 0.82rem;
  line-height: 1.4;
}

.mm-store-choice p strong {
  color: #3d3733;
  font-weight: 700;
}

.mm-store-choice .mm-primary-button,
.mm-store-choice [data-mm-store-select] {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin: auto 0 0;
  padding: 10px 13px;
  border: 1px solid #981f26;
  border-radius: 5px;
  background: #981f26;
  color: #fff;
  font: 700 0.84rem/1.2 Arial, Helvetica, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
}

.mm-store-choice [data-mm-store-select].is-selected {
  border-color: #6f171c;
  background: #6f171c;
}

.mm-store-choice [data-mm-store-select]:disabled {
  cursor: wait;
  opacity: 0.6;
}

.mm-store-selector-status {
  min-height: 0;
  margin-top: 0;
  color: #981f26;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.mm-store-selector-status:not(:empty) {
  min-height: 1.25em;
  margin-top: 11px;
}

.mm-store-selector-close:hover,
.mm-store-selector-close:focus-visible {
  border-color: #981f26;
  color: #981f26;
}

.mm-store-choice [data-mm-store-select]:not(:disabled):hover {
  border-color: #77181e;
  background: #77181e;
}

.mm-store-selector-panel:focus-visible,
.mm-store-selector-close:focus-visible,
.mm-store-choice [data-mm-store-select]:focus-visible {
  outline: 3px solid rgba(152, 31, 38, 0.3);
  outline-offset: 2px;
}

@media (min-width: 540px) {
  .mm-store-selector {
    padding: 20px;
  }

  .mm-store-selector-panel {
    max-height: calc(100vh - 40px);
    max-height: calc(100svh - 40px);
    padding: 26px;
  }

  .mm-store-selector-panel h2 {
    font-size: 2rem;
  }

  .mm-store-selector-intro {
    margin-bottom: 18px;
  }

  .mm-store-selector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .mm-store-choice {
    padding: 16px;
  }
}

@media (max-height: 520px) {
  .mm-store-selector {
    align-items: flex-start;
  }

  .mm-store-selector-panel {
    padding-top: 17px;
  }

  .mm-store-selector-intro {
    margin-bottom: 11px;
  }

  .mm-store-choice {
    padding-block: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-store-selector *,
  .mm-store-selector *::before,
  .mm-store-selector *::after {
    scroll-behavior: auto !important;
  }
}
