/* My Orders (list) / Order Details / Order Tracking — shared components in
   components/orders/*. Inherits the sitewide --sw-primary (theme.css, brand
   navy) rather than a page-local override, per the "existing primary blue
   theme" direction. */

/* ---------- Status badge ---------- */
.sw-order-status-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.sw-order-status-badge.success {
  background: rgba(30, 158, 92, 0.12);
  color: var(--sw-success);
}
.sw-order-status-badge.critical {
  background: rgba(192, 57, 43, 0.1);
  color: var(--sw-error);
}
.sw-order-status-badge.neutral {
  background: rgba(30, 58, 95, 0.08);
  color: var(--sw-primary);
}

/* ---------- Order list page ---------- */
.sw-order-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.sw-order-list-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 380px;
}
.sw-order-list-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 13px;
}
.sw-order-list-search input {
  width: 100%;
  height: 44px;
  border: 1px solid #e2e2e2;
  border-radius: 999px;
  padding: 0 16px 0 40px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease;
}
.sw-order-list-search input:focus {
  border-color: var(--sw-primary);
}
.sw-order-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sw-order-list-filter-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid #e2e2e2;
  background: #fff;
  color: #555;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.sw-order-list-filter-btn:hover {
  border-color: var(--sw-primary);
  color: var(--sw-primary);
}
.sw-order-list-filter-btn.active {
  background: var(--sw-primary);
  border-color: var(--sw-primary);
  color: #fff;
}

.sw-order-list-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Order card ---------- */
.sw-order-card {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 20px 24px;
  background: #fff;
  transition: box-shadow 0.15s ease;
}
.sw-order-card:hover {
  box-shadow: 0 8px 24px rgba(20, 30, 50, 0.06);
}
.sw-order-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f2f2f2;
}
.sw-order-card-id {
  font-size: 14.5px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}
.sw-order-card-date {
  font-size: 12.5px;
  color: #999;
  margin: 2px 0 0;
}
.sw-order-card-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.sw-order-card-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #f5f5f5;
  color: #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.sw-order-card-product {
  flex: 1;
  min-width: 0;
}
.sw-order-card-product-title {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sw-order-card-more {
  font-weight: 500;
  color: #999;
}
.sw-order-card-qty {
  font-size: 12.5px;
  color: #888;
  margin: 3px 0 0;
}
.sw-order-card-total {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}
.sw-order-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sw-order-card-btn {
  flex: 1 1 140px;
  text-align: center;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sw-order-card-btn.ghost {
  border: 1px solid #e2e2e2;
  background: #fff;
  color: #444;
}
.sw-order-card-btn.ghost:hover {
  border-color: var(--sw-primary);
  color: var(--sw-primary);
}
.sw-order-card-btn.solid {
  border: none;
  background: var(--sw-primary);
  color: #fff;
}
.sw-order-card-btn.solid:hover {
  background: var(--sw-primary-hover);
}

@media (max-width: 480px) {
  .sw-order-card {
    padding: 16px;
  }
  .sw-order-card-body {
    flex-wrap: wrap;
  }
  .sw-order-card-total {
    width: 100%;
    text-align: right;
  }
}

/* ---------- Order item row (details page) ---------- */
.sw-order-item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}
.sw-order-item-row:last-child {
  border-bottom: none;
}
.sw-order-item-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #f5f5f5;
  color: #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: hidden;
}
.sw-order-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sw-order-item-info {
  flex: 1;
  min-width: 0;
}
.sw-order-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin: 0;
}
.sw-order-item-meta {
  font-size: 12.5px;
  color: #888;
  margin: 3px 0 0;
}
.sw-order-item-subtotal {
  font-size: 14.5px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}

/* ---------- Pricing summary ---------- */
.sw-order-pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13.5px;
  color: #555;
}
.sw-order-pricing-row.total {
  border-bottom: none;
  padding-top: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}
.sw-order-pricing-discount {
  color: var(--sw-success);
}

/* ---------- Tracking timeline ---------- */
.sw-order-timeline-step {
  display: flex;
  gap: 14px;
}
.sw-order-timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sw-order-timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f2f2f2;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex: 0 0 auto;
}
.sw-order-timeline-step.done .sw-order-timeline-dot {
  background: var(--sw-primary);
  color: #fff;
}
.sw-order-timeline-step.current .sw-order-timeline-dot {
  box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.15);
}
.sw-order-timeline-line {
  width: 3px;
  flex: 1;
  min-height: 32px;
  background: #eee;
  margin: 4px 0;
  border-radius: 999px;
}
.sw-order-timeline-step.done .sw-order-timeline-line {
  background: var(--sw-primary);
}
.sw-order-timeline-content {
  padding-bottom: 28px;
  flex: 1;
}
.sw-order-timeline-step:last-child .sw-order-timeline-content {
  padding-bottom: 0;
}
.sw-order-timeline-label {
  font-size: 14px;
  font-weight: 700;
  color: #999;
  margin: 6px 0 2px;
}
.sw-order-timeline-step.done .sw-order-timeline-label,
.sw-order-timeline-step.current .sw-order-timeline-label {
  color: #1a1a1a;
}
.sw-order-timeline-desc {
  font-size: 12.5px;
  color: #999;
  margin: 0 0 2px;
}
.sw-order-timeline-time {
  font-size: 11.5px;
  color: #b0b0b0;
  margin: 0;
}

.sw-order-timeline-offramp {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(192, 57, 43, 0.06);
}
.sw-order-timeline-offramp i {
  font-size: 26px;
  color: var(--sw-error);
}
.sw-order-timeline-offramp-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--sw-error);
  margin: 0;
  text-transform: capitalize;
}
.sw-order-timeline-offramp-time {
  font-size: 12px;
  color: #b0716c;
  margin: 2px 0 0;
}
