/* R88: quiet blue chip, 44px real hit target; only the visual surface moves. */
.aalam-wgo-host { position: relative; }
.aalam-wgo-search-host { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.aalam-wgo-search-badge {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  pointer-events: none; border-radius: 999px; margin-inline-start: 6px; padding: 2px 8px;
  background: #eef4ff; color: #164fb8; border: 1px solid #c7d8f5;
  font-size: 11px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
button.aalam-wgo-badge {
  position: absolute; inset-inline-start: 8px; inset-inline-end: auto;
  inset-block-start: 8px; inset-block-end: auto; z-index: 3;
  box-sizing: border-box; min-inline-size: 44px; min-block-size: 44px;
  max-inline-size: calc(100% - 16px); width: auto; height: auto;
  margin: 0; padding: 7px 12px; border: 0; border-radius: 999px;
  appearance: none; background: transparent; background-image: none; color: #164fb8;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700;
  line-height: 1.3; text-transform: none; letter-spacing: normal; white-space: normal;
  box-shadow: none; isolation: isolate; transform: none; transition: none;
}
.aalam-wgo-badge::before {
  content: ""; position: absolute; inset: 4px 0; z-index: -1; pointer-events: none;
  border-radius: inherit; background: #f0f5ff; border: 1px solid #c7d8f5;
  box-shadow: 0 2px 6px rgba(15, 43, 87, .12);
  transition: transform 140ms ease;
}
.aalam-wgo-badge-icon {
  display: block; flex: 0 0 19px; inline-size: 19px; block-size: 19px;
  border-radius: 0; background: none; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 140ms ease; transform-origin: 50% 60%;
}
.aalam-wgo-badge-text { font: inherit; line-height: 1.3; min-inline-size: 0; white-space: normal; word-break: normal; overflow-wrap: break-word; text-align: start; }
.aalam-wgo-badge[data-corner="end"], .aalam-wgo-badge[data-corner="bottom-end"] { inset-inline-start: auto; inset-inline-end: 8px; }
.aalam-wgo-badge[data-corner^="bottom"] { inset-block-start: auto; inset-block-end: 8px; }
button.aalam-wgo-badge.is-inline { position: relative; inset: auto; margin: 0; }
.aalam-wgo-badge.is-stale::before { border: 1px dashed #164fb8; }
.aalam-wgo-badge[aria-expanded="true"]::before { background: #e3edff; border-color: #759dde; }
@media (hover: hover) and (pointer: fine) {
  .aalam-wgo-badge:hover::before { transform: translateY(-1px); background: #e3edff; }
  .aalam-wgo-badge:hover .aalam-wgo-badge-icon { transform: rotate(-6deg); }
}
.aalam-wgo-badge:focus-visible { outline: 3px solid #164fb8; outline-offset: 2px; }
.aalam-wgo-badge:focus-visible::before { background: #e3edff; }
.aalam-wgo-badge:active::before { transform: scale(.98); }
.aalam-wgo-badge:active .aalam-wgo-badge-icon { transform: scale(.92); }

.aalam-wgo-popup {
  position: fixed;
  z-index: 1000;
  min-width: 0;
  width: 380px;
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  max-height: calc(100dvh - 24px);
  overflow-wrap: anywhere;
  max-width: min(380px, calc(100vw - 24px));
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(7px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.aalam-wgo-popup.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.aalam-wgo-popup-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: #0f172a;
}

.aalam-wgo-popup-header {
  position: sticky; inset-block-start: -1px; z-index: 1; display: flex;
  align-items: center; justify-content: space-between; gap: 10px;
  margin-block-end: 10px; background: #fff;
}
.aalam-wgo-popup-close {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px;
  min-inline-size: 44px; min-block-size: 44px; padding: 0; border: 1px solid #dbe3ef;
  border-radius: 50%; background: #f5f7fa; color: #334155;
  font-family: inherit; font-size: 23px; line-height: 1; cursor: pointer;
}
.aalam-wgo-popup-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 10px;
  margin-bottom: 7px;
  border-radius: 11px;
  background: #f8fafc;
  color: #0f172a;
}

.aalam-wgo-popup-item:last-child {
  margin-bottom: 0;
}

.aalam-wgo-popup-item.is-discount {
  background: #f0f9ff;
}

.aalam-wgo-popup-item.is-service {
  background: #f0fdf4;
}

.aalam-wgo-popup-name,
.aalam-wgo-popup-name-link {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}

.aalam-wgo-popup-name-link:hover {
  text-decoration: underline;
}

.aalam-wgo-popup-name-link:focus-visible,
.aalam-wgo-popup-accept:focus-visible,
.aalam-wgo-popup-details:focus-visible,
.aalam-wgo-popup-reject:focus-visible,
.aalam-wgo-reminder-add:focus-visible,
.aalam-wgo-reminder-details:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.aalam-wgo-popup-type {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 800;
  background: #dcfce7;
  color: #166534;
}

.aalam-wgo-popup-price {
  font-size: 12px;
  color: #334155;
  direction: ltr;
  unicode-bidi: plaintext;
}

.aalam-wgo-popup-prices {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 12px;
}

.aalam-wgo-popup-price-label {
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.aalam-wgo-popup-prices del {
  color: #64748b;
}

.aalam-wgo-popup-prices ins {
  color: #0f766e;
  text-decoration: none;
  font-weight: 800;
}

.aalam-wgo-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.aalam-wgo-popup-accept,
.aalam-wgo-popup-details,
.aalam-wgo-popup-reject {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.aalam-wgo-popup-accept {
  background: #0284c7;
  color: #ffffff;
}

.aalam-wgo-popup-details {
  background: #e2e8f0;
  color: #0f172a;
}

.aalam-wgo-popup-reject {
  background: #fee2e2;
  color: #991b1b;
}

.aalam-wgo-cart-pill {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.aalam-wgo-lang-ar .aalam-wgo-cart-pill,
html[lang^="ar"] .aalam-wgo-cart-pill {
  margin-inline-start: 0;
  margin-inline-end: 6px;
}

.woocommerce-mini-cart .aalam-wgo-cart-pill,
.etheme-elementor-off-canvas .aalam-wgo-cart-pill,
.etheme-elementor-off-canvas__main .aalam-wgo-cart-pill {
  padding: 1px 7px;
  font-size: 10px;
  line-height: 1.5;
  vertical-align: middle;
}

.woocommerce-mini-cart .aalam-wgo-mini-gift,
.woocommerce-mini-cart .aalam-wgo-mini-discount,
.etheme-elementor-off-canvas .aalam-wgo-mini-gift,
.etheme-elementor-off-canvas .aalam-wgo-mini-discount,
.etheme-elementor-off-canvas__main .aalam-wgo-mini-gift,
.etheme-elementor-off-canvas__main .aalam-wgo-mini-discount {
  position: relative;
}

.woocommerce-mini-cart .aalam-wgo-mini-gift::before,
.woocommerce-mini-cart .aalam-wgo-mini-discount::before,
.etheme-elementor-off-canvas .aalam-wgo-mini-gift::before,
.etheme-elementor-off-canvas .aalam-wgo-mini-discount::before,
.etheme-elementor-off-canvas__main .aalam-wgo-mini-gift::before,
.etheme-elementor-off-canvas__main .aalam-wgo-mini-discount::before {
  position: absolute;
  top: 6px;
  inset-inline-start: 6px;
  z-index: 2;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.45;
  pointer-events: none;
}

.woocommerce-mini-cart .aalam-wgo-mini-gift::before,
.etheme-elementor-off-canvas .aalam-wgo-mini-gift::before,
.etheme-elementor-off-canvas__main .aalam-wgo-mini-gift::before {
  content: "Gift";
  background: #dcfce7;
  color: #166534;
}

.woocommerce-mini-cart .aalam-wgo-mini-discount::before,
.etheme-elementor-off-canvas .aalam-wgo-mini-discount::before,
.etheme-elementor-off-canvas__main .aalam-wgo-mini-discount::before {
  content: "Discount";
  background: #e0f2fe;
  color: #0f4c81;
}

.aalam-wgo-lang-ar .woocommerce-mini-cart .aalam-wgo-mini-gift::before,
.aalam-wgo-lang-ar .woocommerce-mini-cart .aalam-wgo-mini-discount::before,
.aalam-wgo-lang-ar .etheme-elementor-off-canvas .aalam-wgo-mini-gift::before,
.aalam-wgo-lang-ar .etheme-elementor-off-canvas .aalam-wgo-mini-discount::before,
.aalam-wgo-lang-ar .etheme-elementor-off-canvas__main .aalam-wgo-mini-gift::before,
.aalam-wgo-lang-ar .etheme-elementor-off-canvas__main .aalam-wgo-mini-discount::before,
html[lang^="ar"] .woocommerce-mini-cart .aalam-wgo-mini-gift::before,
html[lang^="ar"] .woocommerce-mini-cart .aalam-wgo-mini-discount::before,
html[lang^="ar"] .etheme-elementor-off-canvas .aalam-wgo-mini-gift::before,
html[lang^="ar"] .etheme-elementor-off-canvas .aalam-wgo-mini-discount::before,
html[lang^="ar"] .etheme-elementor-off-canvas__main .aalam-wgo-mini-gift::before,
html[lang^="ar"] .etheme-elementor-off-canvas__main .aalam-wgo-mini-discount::before {
  inset-inline-start: auto;
  inset-inline-end: 6px;
}

.aalam-wgo-lang-ar .woocommerce-mini-cart .aalam-wgo-mini-gift::before,
.aalam-wgo-lang-ar .etheme-elementor-off-canvas .aalam-wgo-mini-gift::before,
.aalam-wgo-lang-ar .etheme-elementor-off-canvas__main .aalam-wgo-mini-gift::before,
html[lang^="ar"] .woocommerce-mini-cart .aalam-wgo-mini-gift::before,
html[lang^="ar"] .etheme-elementor-off-canvas .aalam-wgo-mini-gift::before,
html[lang^="ar"] .etheme-elementor-off-canvas__main .aalam-wgo-mini-gift::before {
  content: "هدية";
}

.aalam-wgo-lang-ar .woocommerce-mini-cart .aalam-wgo-mini-discount::before,
.aalam-wgo-lang-ar .etheme-elementor-off-canvas .aalam-wgo-mini-discount::before,
.aalam-wgo-lang-ar .etheme-elementor-off-canvas__main .aalam-wgo-mini-discount::before,
html[lang^="ar"] .woocommerce-mini-cart .aalam-wgo-mini-discount::before,
html[lang^="ar"] .etheme-elementor-off-canvas .aalam-wgo-mini-discount::before,
html[lang^="ar"] .etheme-elementor-off-canvas__main .aalam-wgo-mini-discount::before {
  content: "خصم";
}

.aalam-wgo-locked-qty {
  display: inline-block;
  min-width: 20px;
  text-align: center;
}

.aalam-wgo-reminder-notice {
  margin: 10px 0 16px;
  padding: 11px 14px;
  border-inline-start: 4px solid #0284c7;
  border-radius: 12px;
  background: #eff6ff;
}

.woocommerce-checkout .aalam-wgo-reminder-notice {
  margin-bottom: 14px;
}

.aalam-wgo-lang-ar .aalam-wgo-reminder-notice,
html[lang^="ar"] .aalam-wgo-reminder-notice {
  direction: rtl;
  text-align: right;
}

.aalam-wgo-reminders {
  margin: 0;
}

.aalam-wgo-reminder-block {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #ffffff;
}

.aalam-wgo-reminder-block:first-child {
  margin-top: 0;
}

.aalam-wgo-reminder-discount {
  border-inline-start: 3px solid #0284c7;
}

.aalam-wgo-reminder-service {
  border-inline-start: 3px solid #16a34a;
}

.aalam-wgo-reminder-inline-notices {
  border-inline-start: 3px solid #dc2626;
  background: #fff7f7;
}

.aalam-wgo-inline-notice {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 700;
}

.aalam-wgo-inline-notice:last-child {
  margin-bottom: 0;
}

.aalam-wgo-inline-notice.is-error {
  background: #fee2e2;
  color: #7f1d1d;
}

.aalam-wgo-inline-notice.is-notice,
.aalam-wgo-inline-notice.is-success {
  background: #e0f2fe;
  color: #0f4c81;
}

.aalam-wgo-reminder-block p {
  margin: 4px 0 10px;
  color: #334155 !important;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 600;
}

.aalam-wgo-reminder-block > strong {
  display: block;
  margin-bottom: 9px;
  padding-bottom: 6px;
  color: #0f172a !important;
  font-size: 16px;
  font-weight: 800;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.aalam-wgo-reminder-list {
  margin: 0 0 4px;
  padding-inline-start: 18px;
}

.aalam-wgo-reminder-list li {
  margin: 6px 0;
}

.aalam-wgo-reminder-discount .aalam-wgo-reminder-list {
  list-style: none;
  padding: 0;
  margin-bottom: 6px;
}

.aalam-wgo-reminder-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.aalam-wgo-reminder-product {
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.aalam-wgo-reminder-discount-label {
  color: #166534;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}

.aalam-wgo-reminder-prices {
  display: inline-grid;
  gap: 4px;
  white-space: normal;
  font-size: 12px;
}

.aalam-wgo-reminder-price-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.aalam-wgo-reminder-price-label {
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.aalam-wgo-reminder-prices del {
  color: #64748b;
}

.aalam-wgo-reminder-prices ins {
  color: #0f766e;
  font-weight: 800;
  text-decoration: none;
}

.aalam-wgo-reminder-price-group.is-before del {
  color: #475569;
}

.aalam-wgo-reminder-price-group.is-after ins {
  color: #0f766e;
}

.aalam-wgo-reminder-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.aalam-wgo-lang-ar .aalam-wgo-reminder-actions,
html[lang^="ar"] .aalam-wgo-reminder-actions {
  justify-content: flex-start;
}

.aalam-wgo-reminder-qty-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 4px;
}

.aalam-wgo-reminder-qty {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(226, 232, 240, 0.75);
  font-size: 12px;
  color: #334155;
}

.aalam-wgo-reminder-add,
.aalam-wgo-reminder-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: filter 0.16s ease, transform 0.16s ease;
}

.aalam-wgo-reminder-add.is-disabled {
  background: #cbd5e1;
  color: #334155;
  cursor: not-allowed;
  pointer-events: none;
}

.aalam-wgo-reminder-limit-note {
  margin: 8px 0 0;
  padding: 7px 10px;
  border-radius: 10px;
  background: #ffedd5;
  color: #9a3412 !important;
  font-size: 13px;
  font-weight: 700;
}

.aalam-wgo-reminder-add:hover,
.aalam-wgo-reminder-details:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.aalam-wgo-reminder-add {
  background: #0284c7;
  color: #ffffff;
}

.aalam-wgo-reminder-details {
  background: #e2e8f0;
  color: #0f172a;
}

.aalam-wgo-reminder-service .aalam-wgo-reminder-list {
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}

.aalam-wgo-reminder-service .aalam-wgo-service-item {
  margin: 8px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: #ecfdf3;
  border: 1px solid #86efac;
  color: #14532d !important;
  font-weight: 700;
  line-height: 1.55;
  word-break: break-word;
}

.aalam-wgo-service-index {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.aalam-wgo-service-text {
  flex: 1 1 auto;
  color: #14532d !important;
  font-size: 14px;
  font-weight: 700;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .aalam-wgo-reminder-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
  }

  .aalam-wgo-reminder-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
.aalam-wgo-badge-text {
    font-size: 11px;
  }

  .aalam-wgo-popup {
    min-width: 0;
    max-width: min(320px, calc(100vw - 12px));
    padding: 10px;
  }

  .aalam-wgo-reminder-notice {
    padding: 10px 12px;
  }

  .aalam-wgo-reminder-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .aalam-wgo-reminder-block {
    padding: 10px 11px;
  }

  .aalam-wgo-reminder-block > strong {
    font-size: 15px;
  }

  .aalam-wgo-reminder-block p {
    font-size: 13px;
  }

  .aalam-wgo-reminder-actions {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aalam-wgo-badge,
  .aalam-wgo-badge::before,
  .aalam-wgo-badge-icon,
  .aalam-wgo-popup,
  .aalam-wgo-reminder-add,
  .aalam-wgo-reminder-details {
    scroll-behavior: auto;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .aalam-wgo-badge:hover::before,
  .aalam-wgo-badge:active::before,
  .aalam-wgo-badge:hover .aalam-wgo-badge-icon,
  .aalam-wgo-badge:active .aalam-wgo-badge-icon {
    transform: none;
  }
}

/* Shared action targets remain at least 44px; image clipping is left to the theme. */
.aalam-wgo-popup-accept, .aalam-wgo-popup-details, .aalam-wgo-popup-reject, .aalam-wgo-retry { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-block-size: 44px; min-inline-size: 44px; line-height: 1.4; }
.aalam-wgo-popup-accept { background: #1b5fcb; color: #fff; }
.aalam-wgo-card-status { font-size: 12px; line-height: 1.5; color: #0f172a; background: #f1f5f9; padding: 8px; }
.aalam-wgo-retry { background: #1d4ed8; color: #fff; border: 0; border-radius: 6px; padding: 8px; margin-inline-start: 6px; cursor: pointer; }
.aalam-wgo-action-error, .aalam-wgo-stale-note { color: #7f1d1d; font-size: 13px; line-height: 1.5; }

/* R87: fallback reserves space outside the image clip; theme image/zoom rules stay intact. */
.aalam-wgo-badge-slot { display: flex; flex-wrap: wrap; align-items: center; min-block-size: 52px; padding-block: 4px; position: relative; clear: both; min-inline-size: 0; max-inline-size: 100%; box-sizing: border-box; flex: 0 0 auto; }
.aalam-wgo-badge-slot > .aalam-wgo-badge.is-inline { position: relative; inset: auto; margin: 0; max-inline-size: 100%; flex: 0 0 auto; }
.aalam-wgo-live-notice { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.aalam-wgo-popup button:focus-visible, .aalam-wgo-retry:focus-visible { outline: 3px solid #164fb8; outline-offset: 2px; }
.aalam-wgo-card-status { margin-block: 8px; border-radius: 12px; overflow-wrap: break-word; min-inline-size: 0; max-inline-size: 100%; box-sizing: border-box; flex: 0 0 auto; }
@media (forced-colors: active) {
  .aalam-wgo-badge::before { background: ButtonFace; border: 1px solid ButtonText; box-shadow: none; }
  button.aalam-wgo-badge { color: ButtonText; }
}
