/* ==========================================================
   Order confirmation / thank-you page (order.php)
   ========================================================== */
.order-confirm-wrap {
  padding: 1.5rem 0 3rem;
  background: linear-gradient(180deg, #fdfcf7 0%, #ffffff 40%, #f8fafc 100%);
  min-height: 60vh;
}

.order-hero {
  background: #fff;
  border: 1px solid rgba(20,20,50,0.08);
  border-radius: 18px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 20px 60px -30px rgba(20,20,50,0.2);
  margin: 1rem 0 1.5rem;
}
.order-hero-delivered {
  background: linear-gradient(160deg, #f0fdf4, #ffffff 50%, #ecfdf5);
  border-color: #86efac;
}
.order-hero-paid {
  background: linear-gradient(160deg, #eff6ff, #ffffff 50%, #f0f9ff);
  border-color: #93c5fd;
}
.order-hero-pending {
  background: linear-gradient(160deg, #fefce8, #ffffff 50%, #fef3c7);
  border-color: #fde68a;
}

.order-check-anim {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 0.85rem;
  animation: orderPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.order-hero-delivered .order-check-anim {
  background: #10b981;
  color: #fff;
  box-shadow: 0 14px 40px -12px rgba(16,185,129,0.5);
}
.order-hero-paid .order-check-anim {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 14px 40px -12px rgba(59,130,246,0.5);
}
.order-hero-pending .order-check-anim {
  background: #f59e0b;
  color: #fff;
}
.order-pulse { animation: orderPulse 1.6s ease-in-out infinite !important; }
@keyframes orderPop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@keyframes orderPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.order-hero-title {
  font-family: 'Outfit','Playfair Display',serif;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  color: #14142b;
  margin: 0.35rem 0 0.5rem;
  line-height: 1.2;
}
.order-hero-sub { color: #4a4560; max-width: 560px; margin: 0 auto 1.15rem; font-size: 1rem; }
.order-hero-meta { color: #6b6580; font-size: 0.85rem; margin-bottom: 1.15rem; }
.order-hero-dot { color: #cfcbe0; margin: 0 0.35rem; }
.order-hero-num strong { color: #14142b; letter-spacing: 0.02em; }

.order-hero-actions {
  display: flex; flex-direction: column; gap: 0.55rem;
  max-width: 380px; margin: 1rem auto 0;
}
.order-open-chat-btn {
  animation: orderPulseBtn 2.2s ease-in-out infinite;
  box-shadow: 0 12px 30px -12px rgba(16,185,129,0.55);
}
@keyframes orderPulseBtn {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* ---------- Panels ---------- */
.order-panel {
  background: #fff;
  border: 1px solid rgba(20,20,50,0.08);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px -18px rgba(20,20,50,0.2);
}
.order-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1rem;
}
.order-panel-title {
  font-family: 'Outfit','Manrope',sans-serif;
  font-size: 1.15rem; font-weight: 700; margin: 0; color: #14142b;
}

.order-status-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem; font-weight: 700;
  background: #f3f4f6; color: #374151;
}
.order-status-delivered      { background: #d1fae5; color: #065f46; }
.order-status-paid           { background: #dbeafe; color: #1e40af; }
.order-status-pending,
.order-status-payment_pending{ background: #fef3c7; color: #92400e; }
.order-status-cancelled      { background: #fee2e2; color: #991b1b; }

/* ---------- Item list ---------- */
.order-item-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.order-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem;
  border: 1px solid rgba(20,20,50,0.08);
  border-radius: 12px;
  background: #fafaf7;
  transition: background 0.15s ease;
}
.order-item:hover { background: #f5f5ef; }
.order-item-media {
  width: 60px; height: 60px;
  border-radius: 10px; overflow: hidden;
  flex-shrink: 0;
  background: #f3f4f6;
  display: flex; align-items: center; justify-content: center;
}
.order-item-media img { width: 100%; height: 100%; object-fit: cover; }
.order-item-fallback { font-size: 1.5rem; color: #a8871e; }
.order-item-body { flex: 1; min-width: 0; }
.order-item-name { margin: 0 0 0.25rem; font-weight: 700; color: #14142b; }
.order-item-name a { color: #14142b; text-decoration: none; }
.order-item-name a:hover { color: #a8871e; text-decoration: underline; }
.order-item-meta { margin: 0; color: #6b6580; font-size: 0.85rem; }
.order-item-download {
  display: inline-block;
  margin-top: 0.4rem;
  color: #10b981; font-weight: 600; font-size: 0.85rem;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  background: #ecfdf5;
  border: 1px solid #86efac;
  border-radius: 999px;
}
.order-item-download:hover { background: #d1fae5; }
.order-item-total { font-weight: 700; font-family: 'JetBrains Mono', monospace; color: #14142b; }

.order-total-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 2px solid #e5e7eb;
  font-size: 1.05rem; font-weight: 700;
  color: #14142b;
}
.order-total {
  font-family: 'Outfit','JetBrains Mono',monospace;
  font-size: 1.5rem; color: #a8871e;
}

/* ---------- Steps ---------- */
.order-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.order-steps li {
  display: flex; align-items: flex-start; gap: 0.85rem;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf5, #fef3c7);
  border: 1px solid #fde68a;
  color: #14142b;
  line-height: 1.5;
}
.order-step-n {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 50%;
  background: #14142b; color: #fef3c7;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Outfit', serif; font-weight: 800;
}

/* ---------- Share panel ---------- */
.order-share-panel {
  background: linear-gradient(135deg, #fff5f5, #fef2f2 60%, #fffbeb);
  border-color: #fecaca;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.order-share-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

@media (max-width: 640px) {
  .order-panel { padding: 1rem 1.15rem; }
  .order-item { flex-wrap: wrap; }
  .order-item-total { margin-left: auto; }
  .order-share-panel { flex-direction: column; align-items: flex-start; }
  .order-hero-actions { max-width: 100%; }
}
