/**
 * My Orders Page Styles
 * Styles for order history and order details pages
 */
/* ==========================================================================
   Container & Layout
   ========================================================================== */
.my-orders-container,
.order-detail-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}
/* ==========================================================================
   Page Header
   ========================================================================== */
.page-header {
  margin-bottom: 2rem;
  text-align: center;
}
.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}
.page-description {
  font-size: 1rem;
  color: #666;
}
/* ==========================================================================
   Order Status Filter
   ========================================================================== */
.orders-filter {
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.filter-btn {
  padding: 0.5rem 1rem;
  border: 2px solid #dee2e6;
  background: white;
  color: #495057;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}
.filter-btn:hover {
  border-color: #0066cc;
  color: #0066cc;
  background: #e7f3ff;
}
.filter-btn.active {
  background: #0066cc;
  border-color: #0066cc;
  color: white;
}
/* ==========================================================================
   Orders List
   ========================================================================== */
.orders-list {
  display: grid;
  gap: 1rem;
}
/* Order Card */
.order-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}
.order-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #0066cc;
}
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}
.order-info h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  color: #1a1a1a;
}
.order-number {
  font-weight: 700;
}
.order-no {
  color: #0066cc;
}
.order-date {
  font-size: 0.875rem;
  color: #6c757d;
}
/* Status Badge */
.order-status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.order-status-badge.status-1 {
  background: #fff3cd;
  color: #856404;
}
.order-status-badge.status-2 {
  background: #cfe2ff;
  color: #084298;
}
.order-status-badge.status-3 {
  background: #d1e7dd;
  color: #0f5132;
}
.order-status-badge.status-4 {
  background: #cff4fc;
  color: #055160;
}
.order-status-badge.status-5 {
  background: #d1e7dd;
  color: #0a3622;
}
/* Order Body */
.order-body {
  margin-bottom: 1rem;
}
.order-details {
  display: grid;
  gap: 0.75rem;
}
.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.detail-item .label {
  color: #6c757d;
  font-size: 0.875rem;
}
.detail-item .value {
  font-weight: 600;
  color: #1a1a1a;
}
.order-total {
  color: #0066cc;
  font-size: 1.125rem;
}
/* Order Footer */
.order-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
/* ==========================================================================
   Empty State
   ========================================================================== */
.empty-state,
.error-state {
  text-align: center;
  padding: 3rem 1rem;
}
.empty-icon,
.error-icon {
  color: #adb5bd;
  margin-bottom: 1rem;
}
.empty-state h3,
.error-state h3 {
  font-size: 1.5rem;
  color: #495057;
  margin-bottom: 0.5rem;
}
.empty-state p,
.error-state p {
  color: #6c757d;
  margin-bottom: 1.5rem;
}
/* ==========================================================================
   Loading State
   ========================================================================== */
.loading-state {
  text-align: center;
  padding: 3rem 1rem;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0066cc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
  margin-top: 2rem;
}
.pagination-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-pagination {
  min-width: 40px;
  height: 40px;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  background: white;
  color: #495057;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-pagination:hover {
  background: #e7f3ff;
  border-color: #0066cc;
  color: #0066cc;
}
.btn-pagination.active {
  background: #0066cc;
  border-color: #0066cc;
  color: white;
  font-weight: 600;
}
.pagination-ellipsis {
  padding: 0.5rem;
  color: #6c757d;
}
/* ==========================================================================
   Order Detail Page
   ========================================================================== */
/* Back Navigation */
.back-navigation {
  margin-bottom: 1.5rem;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}
.btn-back:hover {
  color: #0052a3;
}
/* Order Detail Header */
.order-detail-header {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.order-title-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.order-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}
.order-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.meta-label {
  font-size: 0.875rem;
  color: #6c757d;
}
.meta-value {
  font-weight: 600;
  color: #1a1a1a;
}
/* Order Details Grid */
.order-details-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .order-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .order-details-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* Detail Card */
.detail-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
}
.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e9ecef;
}
.info-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.info-label {
  font-size: 0.875rem;
  color: #6c757d;
}
.info-value {
  font-weight: 500;
  color: #1a1a1a;
}
.address-text {
  color: #495057;
  line-height: 1.6;
  margin: 0;
}
/* Payment Proof */
.payment-proof-container {
  margin-top: 0.5rem;
}
.payment-proof-image {
  max-width: 100%;
  height: auto;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.payment-proof-image:hover {
  transform: scale(1.05);
}
/* Order Items Section */
.order-items-section {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}
.items-table {
  width: 100%;
  min-width: 600px;
}
.items-table thead {
  background: #f8f9fa;
}
.items-table th,
.items-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}
.items-table th {
  font-weight: 600;
  color: #495057;
  font-size: 0.875rem;
  text-transform: uppercase;
}
.items-table tbody tr:last-child td {
  border-bottom: none;
}
.item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.item-name {
  font-weight: 500;
  color: #1a1a1a;
}
.item-code {
  font-size: 0.875rem;
  color: #6c757d;
}
/* Order Summary */
.order-summary {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
}
.summary-label {
  color: #495057;
}
.summary-value {
  font-weight: 600;
  color: #1a1a1a;
}
.discount-text {
  color: #198754;
}
.total-row {
  padding-top: 1rem;
  border-top: 2px solid #dee2e6 !important;
}
.total-value {
  font-size: 1.5rem;
  color: #0066cc;
}
/* Notes Section */
.notes-section {
  background: #fff3cd;
  border: 1px solid #ffecb5;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.notes-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: #856404;
}
.notes-text {
  color: #664d03;
  line-height: 1.6;
  margin: 0;
}
/* Order Actions */
.order-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-primary {
  background: #0066cc;
  color: white;
}
.btn-primary:hover {
  background: #0052a3;
}
.btn-outline {
  background: white;
  color: #0066cc;
  border: 2px solid #0066cc;
}
.btn-outline:hover {
  background: #0066cc;
  color: white;
}
/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .back-navigation,
  .order-actions,
  .filter-buttons {
    display: none !important;
  }
  .order-detail-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .detail-card,
  .order-detail-header,
  .order-items-section,
  .order-summary {
    border: 1px solid #000;
    page-break-inside: avoid;
  }
  .payment-proof-image {
    max-width: 300px;
  }
}
/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
  .page-title {
    font-size: 1.5rem;
  }
  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .order-status-badge {
    align-self: flex-start;
  }
  .filter-buttons {
    flex-direction: column;
  }
  .filter-btn {
    width: 100%;
    text-align: center;
  }
  .order-meta {
    flex-direction: column;
    gap: 0.75rem;
  }
  .order-summary {
    max-width: 100%;
  }
  .items-table th,
  .items-table td {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
  .total-value {
    font-size: 1.25rem;
  }
}
@media (max-width: 480px) {
  .my-orders-container,
  .order-detail-container {
    padding: 0 0.5rem;
  }
  .order-card {
    padding: 1rem;
  }
  .detail-card {
    padding: 1rem;
  }
  .items-table {
    font-size: 0.75rem;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
}
/* ==========================================================================
   Accessibility
   ========================================================================== */
.btn:focus,
.filter-btn:focus,
.btn-pagination:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}
.btn:focus:not(:focus-visible),
.filter-btn:focus:not(:focus-visible),
.btn-pagination:focus:not(:focus-visible) {
  outline: none;
}
/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}