/* My Account Orders Styling */
/* Base styles with responsive approach */
:root {
  --primary-color: #3498db;
  --primary-hover: #2980b9;
  --light-bg: #f9f9f9;
  --border-color: #f0f0f0;
  --text-dark: #333;
  --text-medium: #555;
  --text-light: #666;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --border-radius: 8px;
}

/* Container with responsive padding */
.recent-orders-container {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: clamp(15px, 5vw, 25px);
  margin-bottom: 30px;
  margin-top: 30px;
  width: 100%;
  box-sizing: border-box;
}

.recent-orders-container h2 {
  color: var(--text-dark);
  font-size: clamp(18px, 4vw, 24px);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
  font-weight: 600;
}

ul.recent-orders {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Two columns on PC/tablet */
@media screen and (min-width: 768px) {
  ul.recent-orders {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

ul.recent-orders li {
  padding: clamp(10px, 3vw, 15px);
  margin-bottom: 0;
  border-radius: 5px;
  border-left: 4px solid var(--primary-color);
  background-color: var(--light-bg);
  transition: all 0.3s ease;
  cursor: pointer;
}

ul.recent-orders li:hover {
  transform: translateX(5px);
  background-color: #f0f8ff;
  border-left-color: var(--primary-hover);
}

ul.recent-orders li a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  font-size: clamp(14px, 3.5vw, 16px);
  display: block;
  word-break: break-word;
}

ul.recent-orders li a:hover {
  text-decoration: underline;
}

.order-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 8px;
  font-size: clamp(12px, 3vw, 14px);
  color: var(--text-light);
}

/* Responsive order details */
@media screen and (max-width: 480px) {
  .order-details {
    flex-direction: column;
    gap: 5px;
  }
}

.order-date,
.order-total {
  display: inline-block;
}

.service-id {
  display: block;
  margin-top: 8px;
  font-weight: 600;
  color: var(--text-medium);
  font-size: clamp(12px, 3vw, 14px);
}

.service-id-value {
  font-weight: normal;
  color: #777;
  background-color: var(--border-color);
  border-radius: 3px;
  padding: 2px 6px;
  margin-left: 5px;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.no-orders-message {
  padding: clamp(15px, 4vw, 20px);
  background-color: var(--light-bg);
  border-radius: 5px;
  text-align: center;
  color: var(--text-medium);
}

/* Order status styling */
.order-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: clamp(10px, 2.5vw, 12px);
  font-weight: 600;
  margin-top: 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-completed {
  background-color: #dff0d8;
  color: #3c763d;
}

.status-processing {
  background-color: #d9edf7;
  color: #31708f;
}

.status-on-hold {
  background-color: #fcf8e3;
  color: #8a6d3b;
}

.status-pending {
  background-color: #f2dede;
  color: #a94442;
}

.status-cancelled {
  background-color: #f5f5f5;
  color: #777;
}

.status-refunded {
  background-color: #e6e6e6;
  color: #555;
}

.status-failed {
  background-color: #f2dede;
  color: #a94442;
}

/* Button styling */
.no-orders-message .button {
  display: inline-block;
  padding: clamp(8px, 2vw, 10px) clamp(15px, 4vw, 20px);
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  margin-top: 15px;
  transition: all 0.3s ease;
  font-size: clamp(14px, 3.5vw, 16px);
}

.no-orders-message .button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Additional responsive styles */
@media screen and (max-width: 767px) {
  ul.recent-orders li:hover {
    transform: translateX(3px); /* Smaller transform on mobile */
  }

  ul.recent-orders li {
    border-left-width: 3px; /* Slightly thinner border on mobile */
  }
}

/* Small screens */
@media screen and (max-width: 480px) {
  .recent-orders-container {
    border-radius: 6px;
  }

  ul.recent-orders li {
    display: flex;
    flex-direction: column;
  }

  .order-status {
    align-self: flex-start;
  }

  /* Touch-friendly adjustments */
  ul.recent-orders li {
    min-height: 48px; /* Minimum height for touch targets */
  }

  /* Improve tap targets */
  ul.recent-orders li a,
  .no-orders-message .button {
    padding: 5px 0;
  }
}

/* Print styles */
@media print {
  .recent-orders-container {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  ul.recent-orders li {
    break-inside: avoid;
    border-left-width: 2px;
  }

  ul.recent-orders li:hover {
    transform: none;
    background-color: var(--light-bg);
  }
}
