:root{
  --surface:#ffffff; --text:#0f172a; --muted:#5b6579;
  --line:#e5e7eb; --ring:0 0 0 3px rgba(59,130,246,.25);
  --brand:#2563eb; --brand2:#22c55e; --brand3:#60a5fa;
  --ok:#16a34a; --warn:#f59e0b; --danger:#ef4444;
}

/* Container + centered search */
.bosta-shell{max-width:1100px;margin:0 auto}
.bosta-hero{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px 14px}
.bosta-search{display:flex;gap:10px;align-items:center;width:100%;max-width:560px}
.bosta-input{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;flex:1}
.bosta-input input{all:unset;color:var(--text);flex:1}
.bosta-input:focus-within{box-shadow:var(--ring)}
.bosta-btn{all:unset;position:relative;background:linear-gradient(135deg,var(--brand),var(--brand3));color:#fff;padding:12px 16px;border-radius:12px;cursor:pointer;font-weight:700;box-shadow:0 8px 18px rgba(37,99,235,.22)}
.bosta-btn:focus-visible{outline:none;box-shadow:var(--ring)}
.bosta-spinner{display:none;width:16px;height:16px;border-radius:50%;border:2px solid #fff;border-right-color:transparent;animation:spin .75s linear infinite;margin-left:8px}
.bosta-btn.loading .bosta-spinner{display:inline-block}
@keyframes spin{to{transform:rotate(1turn)}}

.bosta-status{min-height:28px;margin-top:6px}
.bosta-pill{display:inline-flex;gap:8px;align-items:center;padding:8px 12px;border-radius:999px;border:1px solid #dbe7ff;background:#eef4ff}
.bosta-ok{background:#ecfdf5;border-color:#d1fae5}
.bosta-warn{background:#fff7ed;border-color:#ffedd5}
.bosta-danger{background:#fef2f2;border-color:#fee2e2}
.bosta-dot{width:8px;height:8px;border-radius:50%;background:var(--brand)}
.bosta-ok .bosta-dot{background:var(--ok)}
.bosta-warn .bosta-dot{background:var(--warn)}
.bosta-danger .bosta-dot{background:var(--danger)}

/* Content area */
.bosta-content{padding:0 14px 18px}
.bosta-skel{height:160px;border:1px solid var(--line);border-radius:14px;background:linear-gradient(90deg,#fff 25%,#eef2f7 50%,#fff 75%);background-size:200% 100%;animation:shimmer 1.4s infinite;display:none}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* Header card */
.bosta-hdr{padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.06);display:flex;justify-content:space-between;align-items:center;gap:12px}
.bosta-hdr .title{font-weight:800;font-size:20px}
.bosta-chip{padding:6px 10px;border-radius:999px;border:1px solid #dbeafe;background:#eff6ff;color:#1d4ed8;font-weight:700}

/* Progress */
.bosta-stages{margin-top:12px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.06);padding:12px}
.bosta-progress{position:relative;height:8px;background:#eef2f7;border-radius:999px;overflow:hidden;margin:10px 0}
.bosta-progressbar{position:absolute;inset:0;width:0;background:linear-gradient(90deg,var(--brand),var(--brand2),var(--brand3))}
.bosta-steps{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted)}
.bosta-stepdot{width:10px;height:10px;border-radius:50%;background:#cbd5e1;border:2px solid #fff;box-shadow:0 0 0 1px #cbd5e1}
.bosta-stepdot.active{background:var(--brand);box-shadow:0 0 0 1px var(--brand)}

/* Info cards */
.bosta-two{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}
@media (max-width:900px){.bosta-two{grid-template-columns:1fr}}
.bosta-card{padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.06)}
.bosta-muted{color:#5b6579}
.bosta-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.bosta-row{display:flex;justify-content:space-between;gap:10px}
.bosta-k{color:#5b6579}

/* -------- Items (now 100% width, 1 per row) -------- */
.bosta-items-wrap{margin-top:18px;width:100%}
.bosta-items-title{font-weight:800;margin-bottom:10px}

.bosta-items{
  display:block; /* no grid, force block layout */
  width:100%;
	grid-template-columns:unset !important;
}

.item{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  box-shadow:0 6px 20px rgba(15,23,42,.05);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  width:100%; /* full width */
  box-sizing:border-box;
  margin-bottom:14px;
}
.item:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 26px rgba(15,23,42,.08);
  border-color:#dbe4ef;
}

.item .thumb{
  position:relative;
  width:92px;height:92px;
  border-radius:12px; overflow:hidden;
  border:1px solid var(--line);
  background:#f8fafc;
  flex-shrink:0;
}
.item .thumb img{
  width:100%;height:100%;object-fit:cover;
  transition:transform .35s cubic-bezier(.22,1,.36,1);
}
.item:hover .thumb img{ transform:scale(1.04) }

.badge{
display:none !important;
}

.item .name{
  font-weight:800; line-height:1.3; margin-top:2px;
}
.item .name a{ color:var(--text); text-decoration:none }
.item .name a:hover{ text-decoration:underline }

.meta-row{
  display:flex; flex-wrap:wrap; gap:8px; margin-top:6px;
}
.meta-chip{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; color:#384152;
  background:#f1f5f9; border:1px solid #e2e8f0; padding:6px 10px; border-radius:999px;
}

.item .price{
  font-weight:900; font-size:16px; white-space:nowrap;
  margin-left:auto;
}

/* Timeline */
.bosta-timeline{display:grid;gap:8px;margin-top:12px}
.bosta-ev{display:flex;gap:10px;align-items:center}
.bosta-ev .dot{width:10px;height:10px;border-radius:50%;background:#cbd5e1}
.bosta-ev.current .dot{background:var(--brand)}

#bosta-confetti{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none}


/* ==== OTP modal overlay ==== */
.bosta-otp-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;           /* JS = flex */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.bosta-otp-modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  position: relative;
}

.bosta-otp-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.bosta-otp-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.bosta-otp-text {
  margin: 0 0 16px;
  font-size: 14px;
  color: #6b7280;
}

/* 4 small boxes in one row */
.bosta-otp-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.bosta-otp-digit {
  width: 44px;
  height: 44px;
  text-align: center;
  font-size: 20px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  outline: none;
}

.bosta-otp-digit:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.bosta-otp-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.bosta-otp-submit,
.bosta-otp-resend {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

.bosta-otp-submit {
  background: #2563eb;
  color: #fff;
}

.bosta-otp-resend {
  background: #e5e7eb;
  color: #111827;
}

/* blurred fields in delivery card */
.bosta-protected .blurred {
  filter: blur(6px);
  user-select: none;
}

.bosta-otp-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.bosta-otp-modal{
  background:#fff;
  border-radius:16px;
  padding:24px 24px 20px;
  max-width:420px;
  width:100%;
  box-shadow:0 20px 40px rgba(15,23,42,.25);
  position:relative;
}

.bosta-otp-close{
  position:absolute;
  top:10px;
  right:12px;
  border:none;
  background:transparent;
  font-size:22px;
  cursor:pointer;
}

.bosta-otp-title{
  margin:0 0 8px;
  font-size:18px;
  font-weight:700;
}

.bosta-otp-text{
  margin:0 0 12px;
  font-size:14px;
  color:#6b7280;
}

.bosta-otp-error{
  min-height:18px;
  margin-bottom:10px;
  font-size:13px;
  color:#b91c1c;
}

.bosta-otp-autofill{
  position:absolute;
  opacity:0;
  pointer-events:none;
  height:0;
  width:0;
}

.bosta-otp-inputs{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-bottom:16px;
}

.bosta-otp-digit{
  width:48px;
  height:52px;
  text-align:center;
  font-size:24px;
  border-radius:12px;
  border:1px solid #d1d5db;
}

.bosta-otp-actions{
  display:flex;
  justify-content:space-between;
  gap:8px;
}

.bosta-otp-submit,
.bosta-otp-resend{
  flex:1;
  border-radius:999px;
  border:none;
  padding:8px 12px;
  font-size:14px;
  cursor:pointer;
}

.bosta-otp-submit{
  background:#2563eb;
  color:#fff;
}

.bosta-otp-resend{
  background:#e5e7eb;
  color:#111827;
}
/* ===== OTP Modal Inputs Style ===== */

.bosta-otp-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 16px;
  direction: ltr; /* الأرقام من الشمال لليمين */
}

.bosta-otp-digit {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  border: 2px solid #d0d7e2;
  background-color: #ffffff;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bosta-otp-digit::placeholder {
  color: #cbd2e1;
  font-weight: 400;
}

.bosta-otp-digit:focus {
  border-color: #26c6da;
  box-shadow: 0 0 0 2px rgba(38, 198, 218, 0.25);
}

/* نخلي input الـ autofill متخفي */
.bosta-otp-autofill {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}

