:host {
  display: flex;
  flex-direction: column;
  background-color: #f9fafb;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.875rem !important;
  border-radius: 8px;
}

.order-item-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #f9fafb;
  border-radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  font-family: 'Poppins', serif;
}

.item-details {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.item-details h4 {
  font-size: 0.875rem;
  font-weight: 500;
}

.item-details-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary-color);
}

.item-details-seller {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: var(--text-secondary-color);
}

.item-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background: var(--card-background-color);
  border-radius: 4px;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
}

.item-name {
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  background: #e8f0fe;
  color: #001e57;
  padding: 4px var(--space-12);
  border-radius: var(--space-8);
  font-size: 0.75rem;
  margin-left: auto;
}

.button-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.return-button,
.view-details-button {
  padding: var(--space-8) var(--space-16);
  border-radius: var(--space-8);
  cursor: pointer;
  font-size: 0.875rem;
  flex: 1;
}

.view-details-button {
  background: var(--primary-blue);
  color: white;
  border: none;
  /* width: fit-content; */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.view-details-button span {
  color: white;
  font-size: 0.65rem;
  border-radius: 50px;
  transition: transform 0.3s ease;
  display: grid;
  place-content: center;
  width: 20px;
  height: 20px;
}

.view-details-button svg {
  width: 16px;
  height: 16px;
}

.view-details-button span.rotated {
  transform: rotate(90deg);
}

.return-button {
  border: 0.1rem solid var(--primary-blue);
  background-color: white;
  text-align: center;
  color: var(--primary-blue);
  display: block;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.return-button:disabled {
  opacity: 50%;
  cursor: not-allowed;
}

.spinner {
  display: inline-block;
  width: 14px;
  aspect-ratio: 1/1;
  border: 3px solid var(--primary-blue);
  border-top-color: var(--bg-primary); /* Blue color for the spinner */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.timeline {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  opacity: 0;
}

.timeline.visible {
  max-height: 500px; /* Adjust this value based on your content */
  opacity: 1;
  transition: max-height 0.3s ease-in, opacity 0.3s ease-in;
  margin-top: 1rem;
}

.timeline-step {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-bottom: 1rem;
}

.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 16px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card-background-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon svg {
  color: #9ca3af;
  width: 16px;
  aspect-ratio: 1/1;
}

.completed .step-icon {
  background: #dcfce7;
}

.completed .step-icon svg {
  color: #16a34a;
}

h3 {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--primary-black);
}

.step-content p {
  color: var(--text-secondary-color);
  font-size: 0.75rem;
}

h3.grey-out {
  color: var(--text-secondary-color);
}

.loading {
  text-align: center;
  padding: 1rem;
  color: var(--text-secondary-color);
  font-size: 0.875rem;
}
