/* Order Tracking Page Styles */
.tracking-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.order-search-section {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(122, 27, 49, 0.1);
}

.order-search-section h2 {
  color: var(--primary-color);
  margin-bottom: 25px;
  text-align: center;
}

.order-search-section form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.95rem;
}

.form-group input {
  padding: 12px 16px;
  border: 2px solid rgba(122, 27, 49, 0.2);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
  width: 100%;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(122, 27, 49, 0.1);
}

.search-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.search-buttons .btn {
  flex: 1;
  max-width: 200px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.order-details-section {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(122, 27, 49, 0.1);
}

.order-details-section h2 {
  color: var(--primary-color);
  margin-bottom: 25px;
  text-align: center;
}

.order-status {
  margin-bottom: 30px;
  text-align: center;
}

.order-status h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.status-badge {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  min-width: 150px;
}

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-badge.processing {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.status-badge.completed {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-badge.ready {
  background: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #bbdefb;
}

.status-badge.cancelled {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.order-info {
  margin-bottom: 30px;
}

.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item label {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.info-item span {
  color: var(--text-color);
  font-size: 1rem;
}

.order-items {
  margin-bottom: 30px;
}

.order-items h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

#order-items-list {
  margin-bottom: 20px;
}

.order-item {
  display: flex;
  flex-direction: column;
  padding: 15px;
  border: 1px solid rgba(122, 27, 49, 0.1);
  border-radius: 8px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.order-item.approved-item {
  background: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.3);
}

.order-item.pending-item {
  background: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.3);
}

.order-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.order-item-status {
  display: flex;
  align-items: center;
}

.status-indicator {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-indicator.approved-item {
  background: rgba(40, 167, 69, 0.2);
  color: #155724;
}

.status-indicator.pending-item {
  background: rgba(255, 193, 7, 0.2);
  color: #856404;
}

.order-item-name {
  font-weight: 600;
  color: var(--primary-color);
}

.order-item-quantity {
  color: var(--text-color);
  font-size: 0.9rem;
}

.order-item-price {
  font-weight: 600;
  color: var(--secondary-color);
}

.order-item-details {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  min-width: 120px;
  justify-content: flex-end;
  text-align: left;
}

.order-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
}

.total-note {
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.9;
  margin-right: 8px;
}

.order-actions {
  margin-bottom: 30px;
}

.order-actions h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
}

.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-buttons .btn {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
}

.btn-secondary {
  background: #6c757d;
  color: var(--white);
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: #dc3545;
  color: var(--white);
}

.btn-danger:hover {
  background: #c82333;
}

.no-order-section {
  text-align: center;
  padding: 40px 20px;
}

.empty-state {
  color: var(--text-color);
}

.empty-state i {
  font-size: 4rem;
  color: #ccc;
  margin-bottom: 20px;
}

.empty-state h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.empty-state p {
  color: #666;
  max-width: 400px;
  margin: 0 auto;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--white);
  margin: 5% auto;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close {
  color: #aaa;
  float: left;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 15px;
  left: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
  touch-action: manipulation;
}

.close:hover,
.close:focus {
  color: var(--primary-color);
}

.modal-content h2 {
  color: var(--primary-color);
  margin-bottom: 25px;
  text-align: center;
  padding-right: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group-full {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.modal-actions .btn {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  touch-action: manipulation;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tracking-container {
    padding: 10px;
  }
  
  .order-search-section,
  .order-details-section {
    padding: 20px;
  }
  
  .search-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .search-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .info-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .action-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .action-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 95%;
    margin: 5% auto;
    padding: 20px;
    max-height: 90vh;
  }
  
  .modal-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .modal-actions .btn {
    width: 100%;
  }
  
  .order-item {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .order-item-header {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
  
  .status-indicator {
    font-size: 0.7rem;
    padding: 3px 6px;
  }
  
  .close {
    top: 10px;
    left: 15px;
    font-size: 24px;
    width: 35px;
    height: 35px;
  }
  
  .modal-content h2 {
    padding-right: 40px;
    font-size: 1.3rem;
  }
  
  .modal-content h2 {
    padding-right: 35px;
    font-size: 1.2rem;
  }
  
  .modal-content h2 {
    padding-right: 30px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 10px;
  }
  
  .hero-text h1 {
    font-size: 1.8rem;
  }
  
  .hero-text p {
    font-size: 0.9rem;
  }
  
  .order-search-section,
  .order-details-section {
    padding: 15px;
  }
  
  .status-badge {
    min-width: 120px;
    font-size: 0.9rem;
    padding: 8px 16px;
  }
  
  .order-total {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .total-note {
    font-size: 0.7rem;
    margin-right: 0;
    margin-top: 4px;
  }
  
  .modal-content {
    width: 98%;
    margin: 2% auto;
    padding: 15px;
  }
  
  .edit-order-item {
    padding: 12px;
  }
  
  .quantity-btn {
    width: 35px;
    height: 35px;
  }
  
  .remove-item-btn {
    padding: 10px 15px;
    font-size: 0.85rem;
  }
  
  .edit-order-summary {
    padding: 15px;
  }
  
  .summary-row {
    font-size: 0.9rem;
  }
  
  .order-search-section h2,
  .order-details-section h2 {
    font-size: 1.4rem;
  }
  
  .order-status h3,
  .order-items h3,
  .order-actions h3 {
    font-size: 1.2rem;
  }
  
  .info-item label {
    font-size: 0.85rem;
  }
  
  .info-item span {
    font-size: 0.95rem;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Loading Spinner for Order Details */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(122, 27, 49, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

.spinner-container p {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
}

/* Success/Error Messages */
.message {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Edit Order Items Styles */
.edit-order-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border: 1px solid rgba(122, 27, 49, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.5);
}

.edit-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.edit-item-title {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1rem;
}

.edit-item-price {
  color: var(--secondary-color);
  font-weight: 600;
}

.edit-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-btn {
  width: 35px;
  height: 35px;
  border: 1px solid var(--primary-color);
  background: var(--white);
  color: var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: var(--transition);
  min-width: 35px;
  touch-action: manipulation;
}

.quantity-btn:hover {
  background: var(--primary-color);
  color: var(--white);
}

.quantity-btn:disabled,
.quantity-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
}

.quantity-btn:disabled:hover,
.quantity-btn.disabled:hover {
  background: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
}

.quantity-display {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
  color: var(--primary-color);
}

.remove-item-btn {
  background: #dc3545;
  color: var(--white);
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  touch-action: manipulation;
}

.remove-item-btn:hover {
  background: #c82333;
}

.edit-order-summary {
  margin-top: 20px;
  padding: 20px;
  background: rgba(122, 27, 49, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(122, 27, 49, 0.1);
}

.edit-order-summary h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  text-align: center;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(122, 27, 49, 0.1);
}

.summary-row:last-child {
  border-bottom: none;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary-color);
}

/* Responsive Design for Edit Modal */
@media (max-width: 768px) {
  .edit-order-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .edit-item-controls {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .quantity-controls {
    justify-content: center;
  }
  
  .edit-item-info {
    text-align: center;
  }
  
  .edit-item-title {
    font-size: 0.95rem;
  }
  
  .edit-item-price {
    font-size: 0.9rem;
  }
  
  .edit-order-summary h3 {
    font-size: 1.1rem;
  }
  
  .summary-row {
    font-size: 0.9rem;
  }
  
  .edit-order-summary h3 {
    font-size: 1rem;
  }
  
  .summary-row {
    font-size: 0.85rem;
  }
  
  .close {
    top: 8px;
    left: 12px;
    font-size: 20px;
    width: 30px;
    height: 30px;
  }
  
  .modal-content h2 {
    padding-right: 30px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .edit-order-item {
    padding: 10px;
  }
  
  .edit-item-controls {
    gap: 8px;
  }
  
  .quantity-controls {
    gap: 6px;
  }
  
  .quantity-display {
    min-width: 35px;
    font-size: 0.9rem;
  }
}

/* Print Styles */
@media print {
  .action-buttons,
  .order-search-section {
    display: none;
  }
  
  .order-details-section {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .status-badge {
    border: 1px solid #000;
  }

  .order-item-details {
    gap: 12px;
    min-width: 100px;
  }
} 