.custom-popup {
  position: fixed;
  top: 80px;
  left: 42%;
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  font-weight: 600;
  font-size: 16px;
  z-index: 9999;
  animation: fadeInSlide 0.5s ease-out;
}
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
body {
  font-family: Arial, sans-serif;
  background-color: #f9f9f9;
  margin: 0;
  padding: 0;
  font-size: 1.7rem;
}
.header {
  background-color: #f54d1e;
  color: #fff;
  padding: 15px;
  display: flex;
  align-items: center;
}
.header img {
  height: 30px;
  margin-right: 10px;
}
.wrapper {
  margin-top: 7rem;
  position: relative;
}
.container {
  max-width: 132rem;
  margin: auto;
  padding: 1rem 0;
}
.order-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.35) 0 5px 15px;
}
.order-header,
.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.order-status {
  background-color: #ffc107;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 14px;
  color: #000;
}
.delivered-status {
  background-color: #28a745;
  color: #fff;
}
.images {
  display: flex;
  flex-wrap: wrap;
  margin: 10px 0;
}
.images img {
  height: 113px;
  object-fit: cover;
  border-radius: 5px;
  margin: 5px;
  border: 1px solid #ddd;
  padding: 10px;
}
.timeline-container {
  width: 100%;
  padding: 18px 20px 8px 20px;
  display: flex;
  justify-content: center;
}
.timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
}
.step {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ccc;
  color: #fff;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  font-weight: 700;
  transition: all 0.3s ease;
}
.step .icon {
  font-size: 10px;
}
.step.active {
  background-color: #4caf50;
}
.timeline-progress {
  position: absolute;
  top: 50%;
  left: 0;
  height: 4px;
  background-color: #4caf50;
  transform: translateY(-50%);
  z-index: 0;
  transition: width 0.4s ease;
}
.timeline-footer-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 2px;
}
.timeline-footer-icons div {
  text-align: center;
  font-size: 12px;
  flex: 1 1 20%;
  margin: 10px 0;
}
.timeline-footer-icons img {
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
}
.btn-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between;
  margin-top: 10px;
}
.btn-row button {
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #eee;
  width: 100%;
}
@media (min-width: 600px) {
  .btn-row {
    flex-direction: row;
  }
  .btn-row button {
    width: auto;
  }
}
.timeline::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  height: 4px;
  background-color: #ccc; /* grey background line */
  width: 100%;
  transform: translateY(-50%);
  z-index: 0;
}
.delivered-status {
  background-color: #28a745; /* green */
  color: white;
}
.cancelled-status {
  background-color: #dc3545; /* red */
  color: #fff;
}

/* Blur background */
.blur-bg {
  filter: blur(4px);
  pointer-events: none;
}

/* Popup overlay */
#cancel-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Popup box */
#cancel-popup {
  background: #fff;
  padding: 25px 20px;
  border-radius: 12px;
  width: 95%;
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: popupAnim 0.3s ease-out;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

@keyframes popupAnim {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#cancel-popup h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  color: #333;
  text-align: center;
}

#cancel-popup p {
  font-size: 15px;
  color: #555;
  margin-bottom: 15px;
  text-align: center;
}

.cancel-radio-group label {
  display: block;
  background-color: #f6f6f6;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 6px 0;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cancel-radio-group label:hover {
  background-color: #eee;
}

.cancel-radio-group input[type="radio"] {
  margin-right: 8px;
}

#other-reason {
  margin-top: 12px;
}

#other-reason textarea {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  background-color: #fefefe;
}

.cancel-popup-actions {
  margin-top: 20px;
  text-align: right;
  display: flex;
  justify-content: space-between;
}

.cancel-popup-actions button {
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.cancel-popup-actions button[type="button"] {
  background-color: #ccc;
  color: #333;
}

.cancel-popup-actions button[type="button"]:hover {
  background-color: #bbb;
}

.cancel-popup-actions button[type="submit"] {
  background-color: #dc3545;
  color: #fff;
}

.cancel-popup-actions button[type="submit"]:hover {
  background-color: #c82333;
}

/* =============== Order Details Popup Styles =============== */
.order-details-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.order-details-popup {
  background: #fff;
  width: 95%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.3s ease;
  font-family: "Segoe UI", sans-serif;
  color: #333;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.order-section {
  padding: 16px;
  border-bottom: 1px solid #d7d7d7;
}

.order-header-det h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.order-header-det p {
  font-size: 13px;
  color: #777;
  margin: 0;
}

.badges {
  display: flex;
  gap: 10px;
  margin: 10px 0;
  flex-wrap: wrap;
}

.badge {
  font-size: 12px;
  border-radius: 12px;
  padding: 4px 10px;
  color: #fff;
  font-weight: 500;
}

.badge-green {
  background: #28a745;
}
.badge-gray {
  background: #28a745;
  color: white;
}
.badge-red {
  background: #dc3545;
}

.product {
  display: flex;
  padding: 16px;
  border-bottom: 1px solid #eee;
  gap: 10px;
}

.product img {
  width: 90px;
  border-radius: 8px;
}

.product-details {
  font-size: 14px;
  line-height: 1.6;
}

.summary {
  padding: 1rem;
  font-size: 1.8rem;
  /* border-top: 1px solid #eee; */
}

.summary p {
  font-size: 1.8rem;
  margin: 6px 0;
}

.terms {
  padding: 10px;
  font-size: 10px;
  background: #f8f8f8;
  border-top: 1px solid #eee;
  color: #555;
}
.terms p {
  margin-bottom: 6px;
}

.terms ul {
  padding-left: 5px;
  margin: 0;
}

.download-invoice {
  background: #f0f0f0;
  padding: 16px;
  font-size: 14px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #444;
  font-weight: 500;
}

.download-invoice img {
  width: 20px;
}

.close-order-popup {
  background: #f5f5f5;
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  transition: background 0.3s ease;
  float: right;
  margin: 10px;
}

@media (max-width: 600px) {
  .product {
    flex-direction: column;
    align-items: flex-start;
  }

  .product img {
    width: 100%;
  }
}
.half-width {
  width: 50%;
}

.price-line {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}

.price-line.total {
  font-weight: bold;
}

.if_cancel {
  padding: 1rem;
  background-color: #e0e0e0;
  font-size: 1.3rem;
}
