/* ============================================
   Postiyo Order Tracker — Premium UI
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --p-orange:      #E8521A;
  --p-orange-dk:   #C94016;
  --p-orange-lt:   #FFF3EE;
  --p-green:       #16a34a;
  --p-green-lt:    #f0fdf4;
  --p-green-ring:  rgba(22,163,74,.18);
  --p-gray-50:     #f9fafb;
  --p-gray-100:    #f3f4f6;
  --p-gray-200:    #e5e7eb;
  --p-gray-400:    #9ca3af;
  --p-gray-500:    #6b7280;
  --p-gray-700:    #374151;
  --p-gray-900:    #111827;
  --p-radius:      16px;
  --p-radius-sm:   10px;
  --p-shadow:      0 2px 8px rgba(0,0,0,.07);
  --p-shadow-lg:   0 8px 32px rgba(0,0,0,.10);
}

.pot-wrap *{box-sizing:border-box;margin:0;padding:0;}

.pot-wrap {
  max-width: 680px;
  margin: 0 auto;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--p-gray-900);
}

/* ── Card base ───────────────────────────── */
.pot-card {
  background: #fff;
  border-radius: var(--p-radius);
  border: 1.5px solid var(--p-gray-200);
  border-top: 3px solid var(--p-orange);
  box-shadow: var(--p-shadow);
  margin-bottom: 16px;
  overflow: hidden;
  animation: pot-up .3s cubic-bezier(.22,.68,0,1.2) both;
}
@keyframes pot-up {
  from { opacity:0; transform:translateY(10px) scale(.98); }
  to   { opacity:1; transform:none; }
}

/* ── Form card ───────────────────────────── */
.pot-form-card { padding: 28px; }

.pot-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
@media(max-width:520px){ .pot-fields{ grid-template-columns:1fr; } }

.pot-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--p-gray-500);
  margin-bottom: 6px;
}

.pot-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--p-gray-200);
  border-radius: var(--p-radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--p-gray-900);
  background: var(--p-gray-50);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.pot-field input::placeholder { color: var(--p-gray-400); }
.pot-field input:focus {
  border-color: var(--p-orange);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(232,82,26,.12);
}

#pot-btn {
  width: 100%;
  padding: 13px 20px;
  background: var(--p-orange);
  color: #fff;
  border: none;
  border-radius: var(--p-radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(232,82,26,.30);
  transition: box-shadow .18s, transform .12s, background .18s;
}
#pot-btn:hover  {
  background: var(--p-orange-dk);
  box-shadow: 0 6px 18px rgba(232,82,26,.40);
  transform: translateY(-1px);
}
#pot-btn:active  { transform: scale(.98); }
#pot-btn:disabled { opacity:.65; cursor:not-allowed; transform:none; }

.pot-spinner { animation:pot-spin .7s linear infinite; width:18px;height:18px; flex-shrink:0; }
@keyframes pot-spin { to{transform:rotate(360deg);} }

.pot-error {
  margin-top: 12px;
  padding: 11px 14px;
  background: #fff0ee;
  border: 1px solid #fdd0c4;
  border-radius: var(--p-radius-sm);
  color: #b91c1c;
  font-size: 13px;
  font-weight: 500;
}

/* ── Status card ─────────────────────────── */
.pot-status-card { padding: 0; }

.pot-status-header {
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, #fff8f5 0%, #fff 100%);
  border-bottom: 1px solid var(--p-gray-100);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pot-order-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--p-gray-900);
  margin-bottom: 3px;
}
.pot-order-date {
  font-size: 12px;
  color: var(--p-gray-500);
  font-weight: 500;
}
.pot-delivered-line {
  font-size: 12px;
  color: var(--p-gray-500);
  margin-top: 2px;
  font-weight: 500;
}

/* Badge */
.pot-badge {
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pot-badge--green  { background: var(--p-green);  color:#fff; }
.pot-badge--blue   { background: #2563eb;          color:#fff; }
.pot-badge--orange { background: var(--p-orange);  color:#fff; }
.pot-badge--purple { background: #7c3aed;          color:#fff; }
.pot-badge--red    { background: #dc2626;          color:#fff; }
.pot-badge--gray   { background: var(--p-gray-500);color:#fff; }

/* ── Timeline ────────────────────────────── */
.pot-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 26px;
}

.pot-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* connector */
.pot-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--p-gray-200);
  z-index: 0;
  transition: background .4s;
}
.pot-step.done:not(:last-child)::after {
  background: linear-gradient(90deg, var(--p-green) 0%, #4ade80 100%);
}

.pot-step-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--p-gray-200);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: all .25s;
}
.pot-step-dot svg { width:15px;height:15px;stroke:var(--p-gray-400); transition:stroke .25s; }

.pot-step.done .pot-step-dot {
  border-color: var(--p-green);
  background: var(--p-green-lt);
}
.pot-step.done .pot-step-dot svg { stroke: var(--p-green); }

.pot-step.active .pot-step-dot {
  border-color: var(--p-orange);
  background: var(--p-orange);
  box-shadow: 0 0 0 5px rgba(232,82,26,.15), 0 2px 8px rgba(232,82,26,.3);
}
.pot-step.active .pot-step-dot svg { stroke: #fff; }

.pot-step-label {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--p-gray-400);
  text-align: center;
  line-height: 1.3;
  letter-spacing: .1px;
}
.pot-step.done .pot-step-label  { color: var(--p-gray-700); }
.pot-step.active .pot-step-label { color: var(--p-orange); font-weight:700; }

/* ── Summary card ────────────────────────── */
.pot-summary-card { padding: 0; }

.pot-card-title {
  padding: 18px 24px 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--p-gray-900);
  letter-spacing: -.1px;
}

/* Item */
.pot-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--p-gray-100);
  transition: background .15s;
}
.pot-item:hover { background: var(--p-gray-50); }

.pot-item-img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--p-gray-200);
  flex-shrink: 0;
}
.pot-item-img-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--p-gray-100);
  border: 1px solid var(--p-gray-200);
  flex-shrink: 0;
}

.pot-item-info { flex: 1; min-width: 0; }
.pot-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--p-gray-900);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pot-item-meta {
  font-size: 12px;
  color: var(--p-gray-500);
  font-weight: 500;
  line-height: 1.5;
}
.pot-item-meta .pot-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--p-gray-400);
  margin: 0 6px 1px;
  vertical-align: middle;
}

.pot-item-right { text-align: right; flex-shrink: 0; }
.pot-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--p-gray-900);
}
.pot-item-qty {
  font-size: 12px;
  color: var(--p-gray-400);
  margin-top: 3px;
  font-weight: 500;
}

/* Totals */
.pot-totals {
  padding: 14px 24px;
  border-top: 1px solid var(--p-gray-100);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pot-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--p-gray-500);
  font-weight: 500;
}
.pot-grand {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 800;
  color: var(--p-gray-900);
  padding-top: 10px;
  border-top: 2px solid var(--p-gray-100);
  margin-top: 4px;
}
.pot-grand span:last-child { color: var(--p-orange); }

.pot-payment-row {
  padding: 12px 24px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--p-gray-100);
}
.pot-payment-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--p-orange-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pot-payment-icon svg { width:14px;height:14px;stroke:var(--p-orange); }
.pot-payment-text {
  font-size: 13px;
  color: var(--p-gray-500);
  font-weight: 500;
}

/* ── Info box ────────────────────────────── */
.pot-info-box {
  background: var(--p-gray-50);
  border: 1px dashed var(--p-gray-200);
  border-radius: var(--p-radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--p-gray-500);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Button wrapper (centred, not full-width) */
.pot-btn-wrap {
  display: flex;
  justify-content: center;
}
#pot-btn {
  width: auto;
  min-width: 180px;
  padding: 13px 40px;
  border-radius: 99px;
}

/* ── Trust strip ─────────────────────────── */
.pot-trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: #fff5f0;
  border: 1px solid #fde5d8;
  border-radius: var(--p-radius);
  padding: 20px 16px;
  margin-bottom: 14px;
}
@media(max-width:560px){
  .pot-trust-strip { grid-template-columns: 1fr; }
}

.pot-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pot-trust-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.pot-trust-icon img {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  display: block;
}

.pot-trust-text { min-width: 0; }
.pot-trust-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--p-gray-900);
  margin: 0 0 3px;
}
.pot-trust-desc {
  font-size: 12px;
  color: var(--p-gray-500);
  margin: 0;
  line-height: 1.4;
}

/* ── Support strip ───────────────────────── */
.pot-support-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--p-gray-200);
  border-radius: var(--p-radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}
@media(max-width:520px){
  .pot-support-strip { flex-direction: column; align-items: flex-start; }
}

.pot-support-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pot-support-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--p-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pot-support-icon img {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  display: block;
}

.pot-support-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--p-gray-900);
  margin: 0 0 3px;
}
.pot-support-desc {
  font-size: 12px;
  color: var(--p-gray-500);
  margin: 0;
}

.pot-support-btn {
  display: inline-block;
  padding: 10px 22px;
  border: 1.5px solid var(--p-orange);
  border-radius: 8px;
  color: var(--p-orange) !important;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background .18s, color .18s;
  flex-shrink: 0;
}
.pot-support-btn:hover {
  background: var(--p-orange);
  color: #fff !important;
}
