/* Track Order Page Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.container {
  max-width: 600px;
  width: 100%;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 30px;
}

.header h1 {
  color: white;
  font-size: 28px;
  margin-bottom: 10px;
}

.header p {
  color: rgba(255, 255, 255, 0.8);
}

.header a {
  color: white;
  text-decoration: none;
}

/* Search Box */
.search-box {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
}

.search-box h2 {
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.input-group {
  display: flex;
  gap: 10px;
}

.input-group input {
  flex: 1;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.input-group input:focus {
  outline: none;
  border-color: #667eea;
}

.input-group button {
  padding: 15px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.input-group button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.hint {
  text-align: center;
  margin-top: 15px;
  color: #666;
  font-size: 14px;
}

/* Result Box */
.result-box {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: none;
}

.result-box.active {
  display: block;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

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

/* Error */
.error-state {
  text-align: center;
  padding: 40px;
  display: none;
}

.error-state.active {
  display: block;
}

.error-state .icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.error-state h3 {
  color: #dc3545;
  margin-bottom: 10px;
}

.error-state p {
  color: #666;
}

/* Order Found */
.order-found {
  display: none;
}

.order-found.active {
  display: block;
}

/* Order Header */
.order-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 25px;
  text-align: center;
  color: white;
}

.order-header h3 {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 5px;
}

.order-header .order-id {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 2px;
}

/* Status Timeline */
.status-timeline {
  padding: 30px;
  background: #f8f9fa;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  position: relative;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 35px;
  width: 2px;
  height: calc(100% + 20px);
  background: #e0e0e0;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-right: 15px;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-item.completed .timeline-dot {
  background: #28a745;
  color: white;
}

.timeline-item.current .timeline-dot {
  background: #667eea;
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

.timeline-content h4 {
  color: #333;
  margin-bottom: 5px;
}

.timeline-content p {
  color: #666;
  font-size: 14px;
}

.timeline-item.pending .timeline-content h4,
.timeline-item.pending .timeline-content p {
  color: #aaa;
}

/* Order Details */
.order-details {
  padding: 25px;
}

.detail-section {
  margin-bottom: 25px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h4 {
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.detail-row label {
  color: #666;
}

.detail-row span {
  font-weight: 600;
  color: #333;
}

.detail-row .amount {
  color: #28a745;
  font-size: 18px;
}

/* QR Code Section */
.qr-section {
  text-align: center;
  padding: 25px;
  background: #f8f9fa;
  border-top: 1px solid #eee;
}

.qr-section h4 {
  margin-bottom: 15px;
  color: #333;
}

.qr-section img {
  max-width: 180px;
  border: 3px solid #667eea;
  border-radius: 12px;
  padding: 10px;
  background: white;
}

.qr-section p {
  margin-top: 15px;
  color: #666;
  font-size: 14px;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 15px;
}

.status-PENDING {
  background: #fff3cd;
  color: #856404;
}

.status-SUCCESS {
  background: #d4edda;
  color: #155724;
}

.status-PROCESSED {
  background: #cce5ff;
  color: #004085;
}

.status-READY {
  background: #d1ecf1;
  color: #0c5460;
}

.status-COMPLETED {
  background: #d4edda;
  color: #155724;
}

.status-FAILED {
  background: #f8d7da;
  color: #721c24;
}

.status-CANCELLED {
  background: #e2e3e5;
  color: #383d41;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.8);
}

.footer a {
  color: white;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 480px) {
  .input-group {
    flex-direction: column;
  }

  .input-group button {
    width: 100%;
  }
}
