/* ================================================
   ORDERSUCCESS.CSS — Vidhyant Mart / Fresh Cart | Order Confirmation
   ================================================ */

/* --- Success Page Layout --- */
.os-page-wrapper {
  background: var(--bg, #f8fafc);
  min-height: 80vh;
  padding-bottom: 60px;
}

.os-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 60px;
  max-width: 620px;
  margin: 0 auto;
}

/* --- Success Circle Animation --- */
.os-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.os-success__circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #0D7C66);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 28px rgba(13, 124, 102, 0.35);
  margin-bottom: 20px;
  animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.35), 0 8px 28px rgba(13, 124, 102, 0.35);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(22, 163, 74, 0.12), 0 8px 28px rgba(13, 124, 102, 0.35);
  }
}

.os-success__check {
  width: 48px;
  height: 48px;
}

.os-success__path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawCheck 600ms 400ms ease forwards;
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

.os-success__title {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-primary, #0f172a);
  margin: 0 0 8px;
}

.os-success__desc {
  font-size: 14px;
  color: var(--text-secondary, #475569);
  max-width: 440px;
  line-height: 1.6;
  margin: 0;
}

/* --- Order Info Card --- */
.os-card {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 18px;
  padding: 8px 24px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.os-card__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light, #f1f5f9);
}

.os-card__row:last-child {
  border-bottom: none;
}

.os-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f0fdf4;
  color: var(--primary, #0D7C66);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.os-card__icon svg {
  width: 20px;
  height: 20px;
}

.os-card__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.os-card__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #64748b);
}

.os-card__value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  text-align: right;
  word-break: break-word;
}

.os-card__delivery {
  color: var(--primary, #0D7C66);
  font-weight: 800;
}

/* --- Delivery Timeline Stepper --- */
.os-timeline {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.os-timeline__title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 20px;
  color: #0f172a;
  text-align: left;
}

.os-timeline__steps {
  position: relative;
  padding-left: 28px;
}

.os-timeline__steps::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #e2e8f0;
  border-radius: 9999px;
}

.os-timeline__step {
  position: relative;
  padding-bottom: 24px;
  display: flex;
  gap: 16px;
}

.os-timeline__step:last-child {
  padding-bottom: 0;
}

.os-timeline__dot {
  position: absolute;
  left: -28px;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 11px;
}

.os-timeline__step.done .os-timeline__dot {
  background: #16a34a;
  border-color: #16a34a;
}

.os-timeline__step.active .os-timeline__dot {
  background: var(--primary, #0D7C66);
  border-color: var(--primary, #0D7C66);
  box-shadow: 0 0 0 4px rgba(13, 124, 102, 0.18);
}

.os-timeline__content {
  padding-top: 1px;
}

.os-timeline__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin: 0 0 2px;
}

.os-timeline__time {
  font-size: 12px;
  color: var(--text-muted, #64748b);
  margin: 0;
}

/* --- Action Buttons --- */
.os-actions {
  display: flex;
  gap: 14px;
  width: 100%;
  max-width: 520px;
  justify-content: center;
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
  .os-page {
    padding: 24px 14px 40px;
  }
  .os-success__circle {
    width: 84px;
    height: 84px;
  }
  .os-success__title {
    font-size: 22px;
  }
  .os-card {
    padding: 4px 16px;
  }
  .os-timeline {
    padding: 20px 16px;
  }
}

@media (max-width: 576px) {
  .os-actions {
    flex-direction: column;
    gap: 10px;
  }
  .os-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
