/* Standalone quick-ship wizard window (installer-style). */
html,
body.qsw-window {
  margin: 0;
  min-height: 100dvh;
  background: linear-gradient(165deg, #eef1f6 0%, #e3e8f0 45%, #dde3ec 100%);
  color: #141824;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
}

html[lang="en"] body.qsw-window {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

.qsw-shell {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 32rem;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
  overflow: visible;
}

@media (min-width: 480px) {
  .qsw-shell {
    min-height: 0;
    margin: 0;
    max-width: none;
    border-radius: 0;
  }
}

.qsw-chrome {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #e8ecf2;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.qsw-chrome__text {
  flex: 1;
  min-width: 0;
}

.qsw-chrome__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
}

.qsw-chrome__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #64748b;
}

.qsw-chrome__subtitle strong {
  font-weight: 700;
  color: #0f172a;
}

.qsw-chrome__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.qsw-chrome__close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.qsw-progress {
  height: 4px;
  background: #e2e8f0;
}

.qsw-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #14b8a6);
  transition: width 0.35s ease;
}

.qsw-progress__bar--p33 {
  width: 33%;
}

.qsw-progress__bar--p66 {
  width: 66%;
}

.qsw-progress__bar--p100 {
  width: 100%;
}

.qsw-progress__label {
  margin: 0;
  padding: 0.5rem 1rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.qsw-wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  list-style: none;
  margin: 0.75rem 1rem 0;
  padding: 0;
}

.qsw-wizard-steps__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  min-width: 4.5rem;
}

.qsw-wizard-steps__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #64748b;
  border: 2px solid #e2e8f0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.qsw-wizard-steps__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  max-width: 5.5rem;
  line-height: 1.2;
}

.qsw-wizard-steps__item--active .qsw-wizard-steps__badge {
  background: #fff;
  border-color: #ec4899;
  color: #db2777;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

.qsw-wizard-steps__item--active .qsw-wizard-steps__label {
  color: #0f172a;
}

.qsw-wizard-steps__item--done .qsw-wizard-steps__badge {
  background: #14b8a6;
  border-color: #14b8a6;
  color: #fff;
}

.qsw-wizard-steps__item--done .qsw-wizard-steps__label {
  color: #475569;
}

.qsw-wizard-steps__connector {
  flex: 1;
  height: 2px;
  min-width: 1.5rem;
  max-width: 3rem;
  margin-bottom: 1.25rem;
  background: #e2e8f0;
}

.qsw-wizard-steps__connector--done {
  background: #14b8a6;
}

.qsw-body {
  flex: 1;
  overflow: auto;
  padding: 1rem 1rem 1.25rem;
}

.qsw-panel {
  display: none;
}

.qsw-panel.qsw-panel--active {
  display: block;
}

.qsw-field {
  margin-bottom: 0.85rem;
}

.qsw-constraints {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.1rem 0 0.85rem;
}

.qsw-field--compact {
  margin-bottom: 0;
  min-width: 0;
}

.qsw-input--locked,
.qsw-input--locked:disabled {
  height: 2.65rem;
  padding: 0 1.35rem 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  color: #94a3b8;
  background-color: #f8fafc;
  border-color: #e2e8f0;
  cursor: default;
  opacity: 1;
  pointer-events: none;
  -webkit-text-fill-color: #94a3b8;
  white-space: nowrap;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2.6 4.2 6 7.8l3.4-3.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 0.7rem;
}

html[lang="ar"] .qsw-input--locked,
html[lang="ar"] .qsw-input--locked:disabled {
  padding: 0 0.85rem 0 1.35rem;
  background-position: left 0.4rem center;
}

@media print {
  .qsw-field--locked {
    display: none !important;
  }
}

.qsw-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.qsw-input {
  box-sizing: border-box;
  width: 100%;
  height: 2.65rem;
  padding: 0 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.qsw-input:focus {
  border-color: #ec4899;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

.qsw-input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.qsw-field__hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #94a3b8;
}

.qsw-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.qsw-actions--split {
  justify-content: space-between;
}

.qsw-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0 1.15rem;
  border-radius: 0.5rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.qsw-btn--primary {
  min-width: 6.5rem;
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #fff;
  box-shadow: 0 4px 14px rgba(219, 39, 119, 0.35);
}

.qsw-btn--primary:hover {
  filter: brightness(1.05);
}

.qsw-btn--primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.qsw-btn--ghost {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.qsw-message {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.qsw-result {
  text-align: center;
  padding: 0.5rem 0 0;
}

.qsw-result__icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: #ccfbf1;
  color: #0d9488;
  font-size: 1.5rem;
  line-height: 3rem;
}

.qsw-result__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.qsw-result__tracking {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  font-family: ui-monospace, monospace;
  color: #0f172a;
}

.qsw-result__hint,
.qsw-result__login {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.45;
}

.qsw-result__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.qsw-result__login-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.qsw-result__login-block .qsw-result__login {
  margin-bottom: 0.75rem;
}

.qsw-result__login-link {
  display: inline-flex;
  text-decoration: none;
}

.qsw-result__login-email,
.qsw-result__login-password {
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.qsw-result__login-password {
  letter-spacing: 0.12em;
  font-family: ui-monospace, monospace;
}

.qsw-footer {
  padding: 0.65rem 1rem;
  font-size: 0.7rem;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

.qsw-dialog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.qsw-dialog[hidden] {
  display: none;
}

.qsw-dialog__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.qsw-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  padding: 1.25rem 1.15rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.qsw-dialog__message {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #0f172a;
  font-weight: 600;
}

.qsw-dialog__actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.qsw-dialog__link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.qsw-dialog__link:hover {
  color: #1d4ed8;
}

/* Shipping policy popup (quick-ship wizard) — same footprint as the wizard window. */
html,
body.policy-popup-window {
  margin: 0;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: #fff;
  color: #141824;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
}

html[lang="en"] body.policy-popup-window {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

.policy-popup-shell {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  background: #fff;
}

.policy-popup-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e8ecf2;
  background: #fff;
}

.policy-popup-chrome__title {
  margin: 0;
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}

.policy-popup-chrome__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.policy-popup-chrome__close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.policy-prose-scroll--popup {
  flex: 1;
  min-height: 0;
  margin: 0.65rem;
  padding: 1.1rem 1.15rem 1.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 1rem;
  background: #1c2034;
  border: 1px solid #2a3048;
}

.policy-prose-scroll--popup .prose {
  display: grid;
  gap: 1rem;
}

.policy-prose-scroll--popup .prose--policy {
  gap: 1.15rem;
}

.policy-prose-scroll--popup .prose__document-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  color: #f1f5f9;
}

.policy-prose-scroll--popup .prose__paragraph {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.policy-prose-scroll--popup .prose__section {
  display: grid;
  gap: 0.5rem;
}

.policy-prose-scroll--popup .prose__section-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  color: #ffb866;
}

.policy-prose-scroll--popup .prose__list {
  margin: 0;
  padding-inline-start: 1.15rem;
  display: grid;
  gap: 0.45rem;
}

.policy-prose-scroll--popup .prose__list-item {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.policy-prose-scroll--popup .prose__link {
  color: #ffb866;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

