.allergen-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(100%, 520px);
  min-height: 62px;
  margin: 22px auto 0;
  padding: 10px 18px;
  border: 1px solid rgba(27, 79, 64, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.36)),
    #efdfbc;
  color: #1b4f40;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(27, 79, 64, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.allergen-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(27, 79, 64, 0.2);
}

.allergen-trigger:focus-visible,
.allergen-dialog__close:focus-visible {
  outline: 3px solid #9a6f42;
  outline-offset: 3px;
}

.allergen-trigger__icon,
.allergen-trigger__count {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
}

.allergen-trigger__icon {
  width: 30px;
  height: 30px;
  border: 1.5px solid currentColor;
  font-family: Georgia, serif;
  font-size: 20px;
}

.allergen-trigger__count {
  width: 28px;
  height: 28px;
  margin-inline-start: auto;
  background: #1b4f40;
  color: #fff;
  font-size: 13px;
}

.allergen-dialog {
  width: min(760px, calc(100% - 24px));
  max-width: none;
  max-height: min(88vh, 900px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(27, 79, 64, 0.24);
  border-radius: 10px;
  background: #c9bd91;
  color: #1b4f40;
  box-shadow: 0 24px 70px rgba(15, 35, 29, 0.35);
  scrollbar-color: rgba(27, 79, 64, 0.5) transparent;
}

.allergen-dialog::backdrop {
  background: rgba(17, 29, 25, 0.62);
  backdrop-filter: blur(3px);
}

.allergen-dialog__content {
  position: relative;
  padding: 36px clamp(20px, 5vw, 48px) 28px;
}

.allergen-dialog__close {
  position: absolute;
  z-index: 1;
  top: 14px;
  inset-inline-end: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(27, 79, 64, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  color: #1b4f40;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.allergen-header {
  padding: 22px 0 24px;
  text-align: center;
}

.allergen-header__brand {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.allergen-header__english {
  margin: 0;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.allergen-header__arabic {
  margin: 6px 0 12px;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 900;
}

.allergen-header__notice {
  display: grid;
  gap: 5px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.allergen-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  direction: ltr;
  list-style: none;
}

.allergen-item {
  display: flex;
  direction: ltr;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 68px;
}

.allergen-item__number {
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid #1b4f40;
  border-radius: 50%;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
}

.allergen-item__names {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.allergen-item__names [lang="ar"] {
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  text-transform: none;
}

.allergen-footer {
  display: grid;
  gap: 4px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(27, 79, 64, 0.62);
  text-align: center;
}

.allergen-footer p {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  text-transform: uppercase;
}

.allergen-footer p[lang="ar"] {
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
}

@media (max-width: 520px) {
  .allergen-dialog {
    width: calc(100% - 16px);
    max-height: min(92vh, 900px);
    max-height: min(92dvh, 900px);
  }

  .allergen-dialog__content {
    padding: 24px 14px 18px;
  }

  .allergen-dialog__close {
    top: 10px;
    inset-inline-end: 10px;
    width: 34px;
    height: 34px;
  }

  .allergen-header {
    padding: 20px 0 16px;
  }

  .allergen-header__brand {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .allergen-header__english {
    font-size: clamp(20px, 6vw, 28px);
  }

  .allergen-header__arabic {
    margin: 5px 0 8px;
    font-size: clamp(19px, 5.5vw, 25px);
  }

  .allergen-header__notice {
    font-size: 12px;
    line-height: 1.45;
  }

  .allergen-list {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .allergen-item {
    gap: 10px;
    min-height: 54px;
  }

  .allergen-item__number {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    font-size: 17px;
  }

  .allergen-item__names {
    font-size: 13px;
  }

  .allergen-item__names [lang="ar"] {
    font-size: 11px;
  }

  .allergen-footer {
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
  }

  .allergen-footer p,
  .allergen-footer p[lang="ar"] {
    font-size: 11px;
    line-height: 1.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .allergen-trigger {
    transition: none;
  }
}
