/* Alpha-Gal Living 0.10.1: shield control and narrow-screen interface repairs. */

#agl-safety-launch {
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  overflow: visible;
}

#agl-safety-launch .agl-shield-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  font-size: 0;
}

#agl-safety-launch .agl-shield-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-header #agl-safety-launch {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

.mobile-header #agl-safety-launch .agl-safety-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.detail-body > #agl-safety-launch .agl-safety-label,
body > #agl-safety-launch .agl-safety-label {
  display: inline;
}

@media (min-width: 1040px) {
  body > #agl-safety-launch {
    top: auto !important;
    right: 24px !important;
    bottom: 24px !important;
    padding: 12px 17px;
  }
}

.page-title.agl-recipe-page-title {
  position: relative;
  padding-right: 142px;
}

.agl-add-recipe-button {
  position: absolute;
  top: 38px;
  right: 0;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(50, 103, 90, .2);
}

.agl-add-recipe-button .agl-plus {
  font-size: 25px;
  font-weight: 400;
  line-height: .75;
}

.search-wrap.agl-search-enhanced {
  height: auto;
  min-height: 54px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding-right: 7px;
}

.search-wrap .agl-original-filter-icon {
  display: none;
}

.agl-filter-button {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  padding: 8px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.agl-filter-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.agl-category-menu {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(31, 63, 54, .11);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.agl-category-menu[hidden] {
  display: none;
}

.agl-category-menu button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 9px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.agl-category-menu button.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.filter-row {
  width: 100%;
  max-width: 100%;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.filter-row button::before,
.filter-row button::after {
  content: none !important;
}

.filter-row button {
  text-overflow: clip;
  overflow: visible;
}

.recipe-art.agl-photo-fallback .food-emoji {
  z-index: 1;
}

.recipe-art.agl-photo-fallback::after,
.mp-result.agl-photo-fallback::before,
.mp-meal-row.agl-photo-fallback::before {
  content: "Meal photo unavailable";
  color: rgba(36, 59, 53, .7);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.recipe-art.agl-photo-fallback::after {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 2;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(255, 255, 255, .82);
  border-radius: 999px;
  padding: 5px 8px;
}

.mp-result.agl-photo-fallback::before,
.mp-meal-row.agl-photo-fallback::before {
  width: 64px;
  min-width: 64px;
  min-height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--mp-soft);
  padding: 4px;
}

.agl-head,
.mp-head {
  min-width: 0;
  padding-top: max(17px, env(safe-area-inset-top));
}

.agl-head > div,
.mp-head > div,
.agl-pane,
.mp-pane,
.agl-card,
.mp-card {
  min-width: 0;
}

.agl-head h2,
.agl-head p,
.mp-head h2,
.mp-head p,
.agl-pane h3,
.mp-pane h3,
.recipe-card h3,
.detail-title h1 {
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  hyphens: auto;
}

#agl-toolkit,
#mp-app {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-top: max(28px, env(safe-area-inset-top));
}

.agl-sheet,
.mp-shell {
  width: 100%;
  max-height: 100%;
}

.agl-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 520px) {
  .page-title.agl-recipe-page-title {
    padding-right: 0;
  }

  .agl-add-recipe-button {
    position: static;
    margin-top: 14px;
    width: 100%;
  }

  .agl-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agl-filter-button span {
    display: inline;
  }
}

@media (min-width: 700px) {
  .agl-category-menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
