/* Main Content */
body {
  background: #f4f4f4;
  overflow-y: hidden;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.main-content {
  /* margin-top: 30px;
        margin-left: 80px; */
  /* padding: 60px 20px 20px 20px; */
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 95%;
}

.page-title {
  font-size: 2rem;
  font-weight: bold;
  color: black;
  margin-bottom: 15px;
  text-align: center;
}

/* Tabs Container */
.order-tabs {
  display: flex;
  justify-content: space-between;
  background: white;
  width: 90%; /* Expanded width further */
  padding: 15px 0;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
}

.order-tab {
  flex: 1;
  text-align: center;
  /* font-size: 1rem; */
  font-weight: bold;
  color: black;
  cursor: pointer;
  /* padding: 12px 18px; */
  position: relative;
  transition: color 0.3s ease-in-out;
}

.order-tab:hover {
  color: #0000ff;
}

/* Active Tab Indicator */
.active-indicator {
  position: absolute;
  bottom: 0;
  height: 3px;
  background: #0000ff;
  width: 0; /* Will be set dynamically */
  left: 0; /* Ensure it starts at the correct position */
  transition: left 0.3s ease-in-out, width 0.3s ease-in-out;
}

.order-tab.active {
  color: #0000ff;
}

/* .order-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 90%;
  gap: 12px;
  margin-bottom: 25px;
} */

@media (min-width: 800px) {
  .order-controls {
    flex-direction: row;
  }
}

/* .order-search-container {
  display: flex;
  width: 400px;
  align-items: center;

  position: relative;
  border: 2px solid #ccc;
  gap: 10px;
  border-radius: 10px;
} */

.order-search-bar {
  /* width: 450px; */
  /* padding: 12px 12px 12px 0px;
  flex: 1;
  font-size: 1rem;
  outline: none; */
  /* border: 1px solid #ccc; */
  /* border-radius: 8px;
  background: #f4f4f4; */
  /* padding-left: 40px;  */
}

.search-icon {
  /* transform: translateY(-50%); */
  padding: 12px 0px 12px 12px;
  font-size: 1rem;
  color: gray;
}

.date-sort {
  /* padding: 0px 18px; */
  font-size: 0.95rem;
  background-color: #0000ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.date-sort:hover {
  background-color: #0000cc;
}

/* Orders Section */
.orders-wrapper {
  background: white; /* The outer container keeps the visual styling */
  width: 90%;
  padding-top: 30px;
  padding-bottom: 25px;
  padding-left: 30px;
  padding-right: 30px;
  margin-top: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  height: 63vh; /* Outer container has a fixed height */
  display: flex;
  flex-direction: column;
}

/* Scrollable inner container */
.orders-container {
  opacity: 0;
  transform: translateY(10px); /* start position (slid down) */
  transition: opacity 0.4s ease, transform 0.4s ease;
  height: 58vh;
  overflow-y: auto;
  padding: 10px 0;
  background: none;
}

/* Show: fade in + move up */
.orders-container.show {
  opacity: 1;
  transform: translateY(0);
}

/* Hide: fade out + move down */
.orders-container.hide {
  opacity: 0;
  transform: translateY(10px);
}

.empty-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.empty-state img {
  margin-top: 20px;
  width: 200px;
  height: auto;
  margin-bottom: 20px;
}

.empty-state p {
  font-size: 1.2rem;
  color: gray;
}

.order-card {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px 20px;
  margin-bottom: 20px;
  text-align: left;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.order-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.order-card p {
  margin: 6px 0;
  font-size: 0.95rem;
  color: #333;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.order-header .store-name,
.order-header .order-date {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
}

.order-header .order-date span {
  color: #666;
  font-weight: normal;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 12px;
}

.order-actions {
  display: flex;
  gap: 12px;
  color: #888;
  font-size: 1.2rem;
  cursor: pointer;
}

.order-actions .edit-icon:hover {
  color: #0000ff; /* blue for edit */
}

.order-actions .delete-icon:hover {
  color: #ff3b30; /* red for delete */
}

.order-total {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
}

.items-list {
  margin-top: 15px;
}

.item-box {
  display: flex;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 5px solid #0000ff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.item-box p {
  margin: 4px 0;
  font-size: 0.92rem;
  color: #444;
}

.item-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 15px;
  flex-shrink: 0;
}

.item-details {
  flex-grow: 1;
  font-size: 0.9rem;
  color: #444;
  display: flex;
  flex-direction: column;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.product-name {
  margin-bottom: 5px;
  flex: 1;
  min-width: 0;
  word-break: break-word;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* limit to 2 lines */
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-price {
  white-space: nowrap;
  flex-shrink: 0;
  color: #444;
  font-weight: 500;
}

.item-attributes {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: #777;
}

.item-attributes span {
  background-color: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.delivery-button {
  background-color: #4caf50; /* A vibrant green */
  color: white;
  border: none;
  padding: 8px 15px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
}

.delivery-button:hover {
  background-color: #45a049; /* Slightly darker green on hover */
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.delivery-button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.delete-button {
  background-color: #ff3b30; /* A vibrant green */
  color: white;
  border: none;
  /* padding: 8px 15px;
  font-size: 0.95rem; */
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
}

.delete-button:hover {
  background-color: #de342b; /* Slightly darker green on hover */
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.delete-button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.payment-method {
    font-size: 0.95rem;
    margin-top: 8px;
    color: #444;
}
